Looking for support? You can access the support system via your account.
Forums › Forums › Search & Filter Pro › Confusion between Elementor posts widgets
- This topic has 24 replies, 2 voices, and was last updated 4 years, 1 month ago by AURELIEN DERAGNE.
-
AURELIEN DERAGNE(Private) February 25, 2020 at 10:47 am #234803
Hi
I’m using search & filter pro with elementor pro posts widget.
I’ve followed this guide :
https://searchandfilter.com/documentation/3rd-party/elementor/You can have a look at it here
https://neo.ancarel.fr/blog/In this page I use 2 Elementor posts widget.
The Search & Filter filter si normally set only for the second widget.
So I’ve put the code “[searchandfilter id=”xxx” action=”filter_next_query”]” only before the second widget.But when I use the filter, the 2nd widget is modified and takes attributes of the 1st widget that it normally doesn’t have (example : pagination).
How can I fix that ?
Thanks for your help and congratulations for your work.
Best regards,
Aurélien
Trevor Moderator(Private) February 25, 2020 at 11:34 am #234804You may need to see the modifications suggested in this thread:
The javascript is changed.
AURELIEN DERAGNE(Private) February 25, 2020 at 11:49 am #234813Thanks for your answer.
I’ve added this to the text editor before the posts widget, but nothing changes…[searchandfilter id="xxx" action="filter_next_query"] <script>(function ( $ ) { "use strict"; $(document).on("sf:ajaxfinish", ".searchandfilter", function(){ elementorFrontend.hooks.doAction('frontend/element_ready/posts.classic', jQuery('.elementor-widget-posts')); }); }(jQuery));</script>
Trevor Moderator(Private) February 25, 2020 at 11:53 am #234816This may be an issue. Are you able to do a simple test with just one search form and one posts grid on the page? It may be that having more than one post grid is the cause of the problem.
Trevor Moderator(Private) February 25, 2020 at 11:54 am #234818But, if you disable Ajax, does it then work? If it does, it may be that the Ajax Container needs to be very specific.
AURELIEN DERAGNE(Private) February 25, 2020 at 12:13 pm #234823Yes seems to work if I remove the first posts widget.
Seems also to work if I deactivate Ajax.Trevor Moderator(Private) February 25, 2020 at 3:54 pm #234850Try changing the Ajax Container to this:
.elementor-element-2463efa .elementor-widget-posts
and also the part of the javascript that has the same:
[searchandfilter id="xxx" action="filter_next_query"] <script>(function ( $ ) { "use strict"; $(document).on("sf:ajaxfinish", ".searchandfilter", function(){ elementorFrontend.hooks.doAction('frontend/element_ready/posts.classic', jQuery('.elementor-element-2463efa .elementor-widget-posts')); }); }(jQuery));</script>
Please also confirm the actual javascipt does NOT have
xxx
in it?AURELIEN DERAGNE(Private) February 25, 2020 at 8:42 pm #234884Yes of course it does NOT have xxx in it!! 🙂 neither yyy btw…
Can you precise this? Where am I supposed to act?
changing the Ajax Container to this:
.elementor-element-2463efa .elementor-widget-postsThanks
Trevor Moderator(Private) February 26, 2020 at 12:28 pm #234944This reply has been marked as private. -
AuthorPosts
The topic ‘Confusion between Elementor posts widgets’ is closed to new replies.