Forums › Forums › Search & Filter Pro › Ajax not working displaying results: Displaying method: “Custom”
Tagged: ajax
- This topic has 14 replies, 2 voices, and was last updated 5 years, 1 month ago by
Trevor.
-
Anonymous(Private) August 25, 2020 at 5:54 pm #257279
Hi Trevor
Thanks, I updated the id for the container and the plugin settings to:
#thingsathome
But still doesn’t work. When I select an option, all the results fade to grey, like they were loading, but still shows the same number of tiles. However, the number on the right to each filter option update to the right number.And my code looks like this now:
<div id="hidden-filters" class="hidden-height"> <div class="row"> <div class="col-12 col-lg-7"></div> <div class="col-12 col-lg-5"> <h3>Categories</h3> <?php echo do_shortcode('[searchandfilter id="445"]'); ?> </div> </div> </div> </div> <div id='thingsathome' class="container flex-wrapper"> <!-- get_template_part('template-parts/content', 'archive' ); --> <?php $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; $args = array( 'post_type' => 'thingsathome', 'paged' => $paged, //'post_status' => 'publish', //'orderby' => 'date', //'order' => 'ASC', 'tax_query' => array( array( 'taxonomy' => 'thingsathome_category', 'field' => 'term_id', 'terms' => 20, ) ) ); $args['search_filter_id'] = 445; $loop = new WP_Query( $args ); ?> <?php while ( $loop->have_posts() ) : $loop->the_post(); ?> <article class="flex-item" id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php get_template_part('template-parts/common/card-things-at-home' ); ?> </article> <?php endwhile; ?> <?php wp_reset_postdata(); ?> <?php // Pagination $big = 999999999; echo paginate_links( array( 'base' => str_replace( $big, '%#%', get_pagenum_link( $big ) ), 'format' => '?paged=%#%', 'current' => max( 1, get_query_var('paged') ), 'total' => $loop->max_num_pages ) ); ?> </div>
-
AuthorPosts