loadmore on events page

This commit is contained in:
infeeeee
2019-10-08 16:16:37 +02:00
parent b4249a2819
commit dc5fe103c8
5 changed files with 94 additions and 81 deletions

View File

@@ -480,7 +480,12 @@ function misha_loadmore_ajax_handler()
$args['offset'] = $offset + (($_POST['page'] - 1) * $ppp);
query_posts($args);
get_template_part('loop');
if (($args[category_name] == get_theme_mod('dis-2019-event-cat-slug', 'esemeny'))) {
get_template_part('loop-esemeny');
}else{
get_template_part('loop');
}
die; // here we exit the script and even no wp_reset_query() required!
}