worked on a lot of things

This commit is contained in:
2019-07-02 03:46:02 +02:00
parent 98e0282821
commit 43e6e9b373
12 changed files with 860 additions and 161 deletions

View File

@@ -10,6 +10,8 @@ External Modules/Files
// Load any external files you have here
//include 'ChromePhp.php';
/*------------------------------------*\
Theme Support
\*------------------------------------*/
@@ -29,7 +31,7 @@ if (function_exists('add_theme_support')) {
add_image_size('small', 120, '', true); // Small Thumbnail
add_image_size('home-big-thumbnail', 1024, 1024, true); // Custom Thumbnail Size call using the_post_thumbnail('home-thumbnail');
add_image_size('home-small-thumbnail', 256, 256, true); // Custom Thumbnail Size call using the_post_thumbnail('home-thumbnail');
add_image_size('home-event-thumbnail', 1024, 512, true);
add_image_size('home-event-thumbnail', 1024, 512, true);
// Add Support for Custom Backgrounds - Uncomment below if you're going to use
/*add_theme_support('custom-background', array(
@@ -186,6 +188,7 @@ function dis2019_styles()
//remove events from home page
// !!!add event cat id to here!!!!
//search keywords: event esemeny esemény category
function exclude_category_home($query)
{
if ($query->is_home) {
@@ -197,14 +200,37 @@ function exclude_category_home($query)
add_filter('pre_get_posts', 'exclude_category_home');
// order events by date on events page
// !!!add event cat id to here!!!!
//search keywords: event esemeny esemény category
add_action('pre_get_posts', 'dis_2019_order_events_by_date', 1);
function dis_2019_order_events_by_date(&$query)
{
//Before anything else, make sure this is the right query...
if (!$query->get('category_name') == 'esemeny') {
return;
}
$query->set('meta_key', 'dis-esemeny-datum');
$query->set('orderby', 'meta_value');
$query->set('order', 'ASC');
$query->set('meta_value', date("Y.m.d.")); // change to how "event date" is stored
$query->set('meta_compare', '>');
}
// Register dis-2019 Navigation
function register_dis_menu()
{
register_nav_menus(array( // Using array to specify more menus if needed
'header-menu' => __('Header Menu', 'dis2019'), // Main Navigation
'main-left-menu' => __('Főmenü bal oldal', 'dis2019'), // Main Navigation
'main-right-menu' => __('Főmenü jobb oldal', 'dis2019'), // Extra Navigation if needed (duplicate as many as you need!)
// 'sidebar-menu' => __('Sidebar Menu', 'dis2019'), // Sidebar Navigation
'tag-menu' => __('Tag Menu', 'dis2019'), // Extra Navigation if needed (duplicate as many as you need!)
'right-menu' => __('Right Menu', 'dis2019'), // Extra Navigation if needed (duplicate as many as you need!)
'tag-menu' => __('BE DO THINK LOVE', 'dis2019'), // bedo circle
//'main-right-menu' => __('Header Right Menu', 'dis2019'), // Extra Navigation if needed (duplicate as many as you need!)
));
}