Forums › Forums › Search & Filter Pro › First post always added to the bottom of search results
- This topic has 9 replies, 2 voices, and was last updated 3 years, 12 months ago by Anonymous.
-
Anonymous(Private) November 6, 2020 at 12:17 pm #265449
We have a filter set up which is placed in the sidebar. It filters posts by two drop-down filters (an AND relationship), displaying results as Post Type Archive. The filter has a submit and reset button. Post counts are displayed for both filter fields.
The results initially load correctly with the correctly filtered posts, but when we scroll to the bottom of the list, our first post is added to the bottom of the filtered posts (it appears when the scroll reaches the bottom of the list). It’s always the first post, whether or not it already appears further up the filtered list.
Results are loaded via Ajax, but disabling this does not change the problem. Infinite scroll is disabled.
Anonymous(Private) November 6, 2020 at 2:17 pm #265477I hope you could see the previous response – it’s private because there’s password details in it.
Having experimented a bit more, it seems it might be related to the ‘AND’ query. I’ve now added a third filter field and it is now adding the first *two* posts to the end of every search result (including unfiltered, interestingly).
Anonymous(Private) November 14, 2020 at 11:32 am #266445Thanks, I have updated that but the problem persists – the first two posts are added on to the bottom of every query when I scroll to the bottom of the list.
I wonder if it’s a clash with the theme template, but it’s beyond my WordPress competency level to figure that out unfortunately.
Trevor(Private) November 20, 2020 at 11:13 am #267265Looking at it in some detail, it looks like your theme Post Archive template has its own Infinite Scroll in place, as the form for that page is set to Normal Pagination, which the page ignores. But, your theme is a framework type theme, so, instead of using a single template for the page, it calls many (a LOT of) PHP files, so hooking in to that would be very difficult.
For now, the Shortcode method is the simplest solution, short of installing a page builder plugin that we support (like Elementor Pro).
Do let me know if we can close this thread for now?
-
AuthorPosts