Looking for support? You can access the support system via your account.
- This topic has 18 replies, 2 voices, and was last updated 4 years, 7 months ago by .
The topic ‘Query display only one result’ is closed to new replies.
Looking for support? You can access the support system via your account.
Forums › Forums › Search & Filter Pro › Query display only one result
I tried to change the slider, but the jquery seems to conflict.
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.
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?
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.
If you have Ajax ON in our form settings, can you test it with that set to OFF?
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.
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 🙂
Great. Thanks for sharing. I will close this thread for now.
The topic ‘Query display only one result’ is closed to new replies.
© 2024 Search & Filter Support. All Rights Reserved.
This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
We also use cookies to store items in your cart as well as allowing your to login on the site.
You can adjust all of your cookie settings by navigating the tabs on the left hand side.
By continuing to use this site, you also agree to our Privacy Policy.
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
*Other cookies used for logging in and cart functions will only be used when you use those features and cannot be disabled.
If you disable these cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.
This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.
Keeping this cookie enabled helps us to improve our website.
Please enable Strictly Necessary Cookies first so that we can save your preferences!
More information about our Cookie Policy