2019 08 28 word mods
This commit is contained in:
@@ -41,7 +41,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, 537, true);
|
||||
|
||||
// Add Support for Custom Backgrounds - Uncomment below if you're going to use
|
||||
/*add_theme_support('custom-background', array(
|
||||
@@ -130,6 +130,9 @@ function dis2019_header_scripts()
|
||||
wp_register_script('ftellipsis', get_template_directory_uri() . '/js/lib/ftellipsis.min.js', array(), '1.0.0'); //
|
||||
wp_enqueue_script('ftellipsis'); // Enqueue it!
|
||||
|
||||
wp_register_script('touchSwipe', get_template_directory_uri() . '/js/lib/jquery.touchSwipe.min.js', array('jquery'), '1.6.18'); //
|
||||
wp_enqueue_script('touchSwipe'); // Enqueue it!
|
||||
|
||||
wp_register_script('dis2019scripts', get_template_directory_uri() . '/js/scripts.js', array(
|
||||
'jquery',
|
||||
'conditionizr',
|
||||
@@ -139,6 +142,7 @@ function dis2019_header_scripts()
|
||||
'jquery.colorbox',
|
||||
'lettering',
|
||||
'ftellipsis',
|
||||
'touchSwipe',
|
||||
// 'clamp',
|
||||
), '1.0.0'); // Custom scripts
|
||||
wp_enqueue_script('dis2019scripts'); // Enqueue it!
|
||||
@@ -445,16 +449,16 @@ function misha_loadmore_ajax_handler()
|
||||
// console_debug($args);
|
||||
if ($args['cat']) {
|
||||
// console_debug('cat query');
|
||||
$offset = get_theme_mod('dis-2019-posts-on-archive');
|
||||
$offset = get_theme_mod('dis-2019-posts-on-archive', 11);
|
||||
}
|
||||
if ($args['s']) {
|
||||
// console_debug('search query');
|
||||
$offset = get_theme_mod('dis-2019-posts-on-archive');
|
||||
$offset = get_theme_mod('dis-2019-posts-on-archive', 11);
|
||||
}
|
||||
|
||||
if ($args['tag']) {
|
||||
// console_debug('tag query');
|
||||
$offset = get_theme_mod('dis-2019-posts-on-tag');
|
||||
$offset = get_theme_mod('dis-2019-posts-on-tag', 10);
|
||||
}
|
||||
|
||||
//Next, determine how many posts per page you want (we'll use WordPress's settings)
|
||||
@@ -482,7 +486,7 @@ add_action('wp_ajax_nopriv_loadmore', 'misha_loadmore_ajax_handler'); // wp_ajax
|
||||
function exclude_category_home($query)
|
||||
{
|
||||
if ($query->is_home) {
|
||||
$minus_catid = '-' . get_theme_mod('dis-2019-event-cat-id');
|
||||
$minus_catid = '-' . get_theme_mod('dis-2019-event-cat-id', 5);
|
||||
$query->set('cat', $minus_catid);
|
||||
|
||||
}
|
||||
@@ -495,7 +499,7 @@ function dis_2019_order_events_by_date(&$query)
|
||||
{
|
||||
|
||||
//Before anything else, make sure this is the right query...
|
||||
if (!($query->query_vars[category_name] == get_theme_mod('dis-2019-event-cat-slug'))) {
|
||||
if (!($query->query_vars[category_name] == get_theme_mod('dis-2019-event-cat-slug', 'esemeny'))) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -524,16 +528,22 @@ function dis_2019_more_posts_on_home(&$query)
|
||||
return;
|
||||
}
|
||||
|
||||
// console_debug($query);
|
||||
|
||||
|
||||
console_debug($query);
|
||||
// console_debug($query->query_vars[related_loop]);
|
||||
|
||||
|
||||
if ($query->is_home()) {
|
||||
$pposts = get_theme_mod('dis-2019-posts-on-home');
|
||||
$pposts = get_theme_mod('dis-2019-posts-on-home',20);
|
||||
} elseif ($query->is_tag()) {
|
||||
$pposts = get_theme_mod('dis-2019-posts-on-tag');
|
||||
$pposts = get_theme_mod('dis-2019-posts-on-tag', 10);
|
||||
} elseif ($query->query_vars[related_loop]) {
|
||||
$pposts = get_theme_mod('dis-2019-related-posts', 3);
|
||||
} elseif ($query->is_archive()) {
|
||||
$pposts = get_theme_mod('dis-2019-posts-on-archive');
|
||||
$pposts = get_theme_mod('dis-2019-posts-on-archive', 11);
|
||||
} elseif ($query->is_search()) {
|
||||
$pposts = get_theme_mod('dis-2019-posts-on-archive');
|
||||
$pposts = get_theme_mod('dis-2019-posts-on-archive', 11);
|
||||
} elseif (!$query->in_the_loop()) {
|
||||
return;
|
||||
} else {
|
||||
@@ -543,6 +553,7 @@ function dis_2019_more_posts_on_home(&$query)
|
||||
|
||||
//set post_per_page if it's homepage
|
||||
if (!$query->is_paged) {
|
||||
// console_debug($pposts);
|
||||
$query->set('posts_per_page', $pposts);
|
||||
} else {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user