Support Forums

Support Forums Forums Search & Filter Pro Query display only one result

This topic is: resolved
Viewing 10 posts - 1 through 10 (of 19 total)
  • Marie-Eve Benson


    I try to display the result with ajax, but even if I didn’t make a search the query show me only one result and it’s look like it’s the last one.

    And the ACF fields doesn’t work.

    Here is my query:

    		echo do_shortcode('[searchandfilter id="256"]');
    		$loop = array('post_type' => 'realisations','posts_per_page' => 6);
    		$args['search_filter_id'] = 256;
    		$query = new WP_Query($args); ?>
    		<div class="results">
    				<?php if ( $query->have_posts() ) :
    					while ( $query->have_posts() ) : $query->the_post(); ?>
    						<?php the_title(); ?><br />
    						<?php the_field('annee'); ?><br />
    						<?php the_field ('adresse'); ?><br />
    						<?php the_content(); ?>
    					<?php endwhile; 
    				endif; ?>

    Display results method: Custom
    Result URL:
    Load results using Ajax?: check
    Make searches bookmarkable?: unchek
    Only use Ajax on the results page?: uncheck
    Ajax Container: .results

    Thank you

    Trevor Moderator
    This reply has been marked as private.
    Marie-Eve Benson
    This reply has been marked as private.
    Trevor Moderator

    I cannot see any issue.

    If WPML is disabled, does it work?

    Did you try using our Shortcode method?

    Marie-Eve Benson

    I tried, no difference.
    No matter which filter I choose the result is the same or it disappears.

    I changed the shortcode and it’s the same thing, only one result.
    If I choose the Division filter and the Solution option (9) the result is No Result Found.

    Here’s my code:

    echo do_shortcode(‘[searchandfilter id=”256″]’);

    echo do_shortcode(‘[searchandfilter id=”256″ show=”results”]’);

    Trevor Moderator

    What happens if you use the 2019 theme instead?

    Marie-Eve Benson

    I switch for 2019 theme and same result.

    You can see it here :

    Trevor Moderator

    Very odd. As we both can see, this is not right. Are you able to make a development site with a completely basic install, with just your theme and Search and Filter. Add some test posts, a form and test that?

    Marie-Eve Benson

    Have you done something ? It’s working now.

    Marie-Eve Benson

    Now I have another problem.

    It seems to have a problem with jquery.
    I have sliders and when I try to filter the results the sliders disappear.

Viewing 10 posts - 1 through 10 (of 19 total)

The topic ‘Query display only one result’ is closed to new replies.