Forums › Forums › Search & Filter Pro › Query display only one result
- This topic has 18 replies, 2 voices, and was last updated 5 years, 9 months ago by
Trevor.
-
Anonymous(Private) September 13, 2019 at 1:57 pm #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(Private) September 16, 2019 at 2:08 pm #221090If 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?
Anonymous(Private) September 16, 2019 at 3:59 pm #221113Found 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 🙂
-
AuthorPosts