- This topic has 11 replies, 3 voices, and was last updated 6 years, 6 months ago by .
These forums are now closed and remain for historical purposes.
None of the content applies to the new version 3. For support, get in touch via our contact form.
Forums › Forums › Search & Filter Pro › Trouble using the plugin
I figured it out. The script needed to relayout masonry is:
(function ( $ ) {
"use strict";
//detects when the ajax request has finished and the content has been updated
// - add scripts that apply to your results here
$(document).on("sf:ajaxfinish", ".searchandfilter", function(){
elementorFrontend.init();
//so load your lightbox or JS scripts here again
});
}(jQuery));
Also, in some circumstances, I noticed there were some pagination issues, these can be fixed by adding this to functions.php (replacing my-posts
, with the slug of the page the posts widget is on):
//fix pagination issues in elementor when using posts widget with S&F
add_action('loop_start', 'elementor_post_widget_pagination_fix', 10);
function elementor_post_widget_pagination_fix($query)
{
if(is_page("my-posts")){
$sf_paged = 1;
if(isset($_GET['sf_paged'])){
$sf_paged = intval($_GET['sf_paged']);
}
set_query_var("paged", $sf_paged); //elementor uses get_query_var to get current page, so lets set it before its performeed
}
remove_action('loop_start', 'elementor_post_widget_pagination_fix', 10);
}
Thanks
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