Support Forums

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

This topic is: resolved

This topic contains 18 replies, has 2 voices, and was last updated by  Trevor 4 days, 7 hours ago.

Viewing 10 posts - 1 through 10 (of 19 total)
  • Marie-Eve Benson
    #220699

    Hi,

    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.

    https://intoinc.mebdev.ca/realisation/

    And the ACF fields doesn’t work.

    Here is my query:

    <?php
    
    		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; ?>
    
    		</div>

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

    Thank you

    Trevor Moderator
    #220727
    This reply has been marked as private.
    Marie-Eve Benson
    #220733
    This reply has been marked as private.
    Trevor Moderator
    #220735

    I cannot see any issue.

    If WPML is disabled, does it work?

    Did you try using our Shortcode method?

    Marie-Eve Benson
    #220737

    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
    #220739

    What happens if you use the 2019 theme instead?

    Marie-Eve Benson
    #220743

    I switch for 2019 theme and same result.

    You can see it here : https://intoinc.mebdev.ca/realisation/

    Trevor Moderator
    #220747

    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
    #220829

    Have you done something ? It’s working now.

    Marie-Eve Benson
    #220834

    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.