AnonymousInactive
I created a test page with the Elementor posts and that works with the pagination, so I’m assuming the issue is tied to Anywhere Elementor. Are there any specific settings I can adjust to make it work?
http://aaronc14.sg-host.com/test-search
Can you replace the script with this (I hope this is correct, I just re-wrote it for you):
(function ( $ ) {
"use strict";
// detects when the ajax request has finished and the content has been updated
// re-init the layout scripts from Elementor
$(document).on("sf:ajaxfinish", ".searchandfilter", function(){
elementorFrontend.hooks.doAction('frontend/element_ready/archive-posts.archive_cards', jQuery('.elementor-widget-archive-posts'));
});
}(jQuery));
Hi Serena
You are correct, I see some unusual things happening with the pagination.
2 things I think we should try:
1) Use an Elementor posts module (for testing only) to see if the pagination comes out ok
2) Check (and enable if disabled) the settings (in the “display results” tab) ->Make searches bookmarkable and Only use Ajax on the results page and that ajax pagination -> pagination type is set to normal.
Let me know once you’ve done those and the results of that, then we should have a better idea of the problem going forwards.
Thanks
Hi Nunzio
With Elementor, there isn’t a method you can use to create a ‘no results’ message for Ajax results refreshes. That is the way Elementor is coded, sorry.
AnonymousInactive
I’m using Elementor Pro and Search and Filter ajax method. So i do as it said in documentation. Now when i change value, it filter but resuts are not correct and the design of this result also change.
This is the link: https://aced-benin.org/publications/
Hi Serena
To setup Elementor you will need to follow the steps here:
https://searchandfilter.com/documentation/3rd-party/elementor/
However I see you are using Anywhere Elementor – while we don’t officially support it, it should work.
Try changing the Ajax Container setting (in the display results tab of your search form) to:
.ae-post-layout-list
Let me know how you get on.
Thakns
Hi Marco
I can see the issue.
You have for your Ajax Container (in display results tab) the value: .elementor-widget-posts
Because you have two post widgets on the page with this class, Search & Fitler doesn’t know which one to update.
In elementor, on the posts element you want to filter, you need to add a custom class (so there is one one existing on the page), and use this for your ajax container.
I hope that makes sense?
Sorry that was not correct (.elementor-posts) – the pagination was not updating, it should be .elementor-widget-archive-posts. (I’ve update this)
Thanks
Hi Tanya
If the homepage is an archive (the blog archive) then in Search & Filter, you can set the display method to post type archive.
I’ve just done this for you and it worked a bit better, but not completely.
I did not realise, but on the home page archive, the Ajax Container should be .elementor-posts, I’ve changed this, and now all seems to work correctly?
Thanks
AnonymousInactive
I followed all the instructions to create a search form on my elementor site, but it doesn’t seem to filter any results unless the page is refreshed. Even then, the search term shows up as blank.
http://aaronc14.sg-host.com/shiurim/