- This topic has 6 replies, 4 voices, and was last updated 11 months, 2 weeks ago by Tom.
April 1, 2020 at 2:07 am #1221813Jackie
Got a strange issue occurring on the blog page of our website. We are using the infinite scroll feature but every time more posts are loaded it’s always the same 10 that load.
I have tried changing the number of blog posts per page but of course this forces them all to load which defeats the purpose of infinite scroll.
Can’t quite figure out what’s causing this. Wondering if you would be able to point me in right direction 🙂April 1, 2020 at 3:59 am #1221905DavidStaffCustomer Support
Can you try disabling other plugins or remove any custom functions or hooks – particularly ones that are adding JS to see if there is a conflict.April 22, 2020 at 1:10 am #1248859NIKOLAY
Few weeks ago I notice same problems with my theme. That is why I did not use infinite scroll.
Today I try to install your theme and plugin on clean web site and it is work perfect. For sure there is some confilct and I think it is not plugin, because infinite scroll still stuck after 3rd load even if all plugins are disabled. (Very strange)
I use 2 hooks only in my page – one is Post slider code (before_main_content) and 2nd one is for generating 2nd navigation only on small screens.
Is it possible addign extra hooks only to cause this?
Best regards: NickApril 22, 2020 at 9:44 am #1249564TomLead DeveloperLead Developer
The way our infinite scroll works is by requesting the posts from
/page/2/and so on. So it actually uses core WordPress pagination and simply grabs the posts.
If core WordPress pagination is broken, infinite scroll will be broken as well.
When it comes to broken pagination, it’s usually a plugin altering the posts query, or even a custom function. It could also be server related, but that’s less likely.April 28, 2020 at 3:45 am #1259238Jackie
Thanks for the responses all.
We have quite a few custom functions in the theme files so I’ll go through and disable those and see if I can find the root cause.
JackieMay 11, 2020 at 9:19 am #1279416Jackie
Just wanted to follow up on this as I managed to resolve the issue.
We had a regex redirect in place that was redirecting all paginated pages back to the main page. I assume this meant that the AJAX call was requesting /latest/page/2 which was then redirecting to /latest/ and returning the first batch of posts again.
Disabling the redirect was the answer to our problems 🙂May 11, 2020 at 5:29 pm #1279991
- You must be logged in to reply to this topic.