Support Forums

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro Query display only one result

Viewing 9 posts - 11 through 19 (of 19 total)
  • Marie-Eve Benson
    #220907

    I tried to change the slider, but the jquery seems to conflict.

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

    Hi,

    Thanks, I changed the jquery version and added the migrate jquery script.
    It help a bit.

    Now I can see the first image, but nothing else work.

    I tried different version of jquery, there’s no errors in the console.

    My WordPress is up to date as well as the plugins.

    Trevor Moderator
    #221090

    If I perform a search where 9 results are expected, I see that the loop works for nine:

    https://www.screencast.com/t/PafwHPG9

    In the first result I do see three images:

    https://www.screencast.com/t/gTuM5NGD

    But, they are no longer a gallery. This suggests to me that the gallery JavaScript needs to be triggered after our ajax is run, like this:

    <script>(function ( $ ) {
      "use strict";
      $(document).on("sf:ajaxfinish", ".searchandfilter", function(){
        console.log("ajax complete");
    
    // call your gallery script/function here
    
      });
    }(jQuery));</script>

    But, the remaining post results are all empty?

    https://www.screencast.com/t/bfgoOV4f64

    Marie-Eve Benson
    #221094

    Ok just tried it and it doesn’t work.

    But in the console, “Ajax complete” is present when the search is complete.

    I put it at the end in the footer.php file.

    Trevor Moderator
    #221098

    If you have Ajax ON in our form settings, can you test it with that set to OFF?

    Marie-Eve Benson
    #221100

    It’s not working, I get the same results.

    But with your code now the gallery doesn’t work at all, even if I don’t use the filter.

    Marie-Eve Benson
    #221113

    Found the solution.

    I checked the option: If the user is not on the results page already, the first submit of the Search Form will cause a page redirect.

    And in the footer I added your code plus:

    <script>
    		$('.galerie').slick({
    		  autoplay: true,
    		  autoplaySpeed: 2000,
    		});
    		
    		(function ( $ ) {
    		  "use strict";
    		  $(document).on("sf:ajaxfinish", ".searchandfilter", function(){
    			console.log("ajax complete");
    
    			$('.galerie').slick({
    			  autoplay: true,
    			  autoplaySpeed: 2000,
    			});
    
    		  });
    		}(jQuery));</script>

    Thank for your help 🙂

    Trevor Moderator
    #221115

    Great. Thanks for sharing. I will close this thread for now.

Viewing 9 posts - 11 through 19 (of 19 total)

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