Forums › Forums › Search & Filter Pro › Custom post type ajax refresh on resutls
Tagged: ajax filters, custom page, custom post type
- This topic has 4 replies, 2 voices, and was last updated 5 years ago by Trevor.
-
Anonymous(Private) November 12, 2019 at 2:34 pm #226361
Hello, i have set a custom post type, i used a custom page to implement the resutls i have a side bar filter and the resutls in the main area,
the problem
when i apply filters the resutls in the main airea wont refresh, what is the right way to implement this? thanksthis is what i have,
<?php
$args = Array(
“post_type”=>”post”,
“search_filter_id”=>64,
“orderby”=>”ID”,
“order”=>”DESC”,
“paged”=>1,
);
query_posts($args);?>
<?php if ( have_posts() ) : ?>
<?php /* Start the Loop */ ?>
<?php $count = 0; ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php if ($count % 4 == 0) { ?>
<div class=”row mb-4”>
<?php } ?>
<?php/*
* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( ‘loop-templates/content’, ‘grid’);
?>
<?php $count++; ?>
<?php if ($count % 4 == 0) { ?>
</div>
<?php } ?>
<?php endwhile; ?>
<?php else : ?><?php get_template_part( ‘loop-templates/content’, ‘none’ ); ?>
<?php endif; ?>
-
AuthorPosts