Archived topic
Load more button not working on post category pages
15 replies · Started by David on May 5, 2020
Hi guys,
For some reason my Load more button works fine on the main blog page but not on category pages. Looked everywhere and tried all that I can but I can't find the reason for this anywhere.
Any help would be amazing!
Hi there,
do you have a custom permalink structure like /%category%/%postname%/ in your Settings > Permalinks ? I know this used to mess up archive pagination on older versions of WP ..... Let me know
Hi, sorry for the delay in getting back to you.
Yes I use that type of permalink structure but I use infinite scroll and the load more button so there is no pagination as such.
Basically on the main blog page it works fine - you hit Load more and it gives another batch underneath on the same page. But on category pages it just tries to load, the button disappears and no more posts are actually loaded.
I've tried changing on page settings, settings in GP, wordpress and a few others but I can't find the issue.
Do you know what else it might be?
That permalink structure is a known problem with WordPress and Paged content such as archives.
The simplest fix is to change the structure to just the postname
Hi David,
This is happening on my blog category page e.g. on this page: https://cpdonline.co.uk/knowledge-base/health-and-safety/
I use a custom structure as described but this is for individual posts - would this still impact the category page?
I can't really change any URL structures to be honest without it impacting SEO - is there a workaround that you know of?
Thanks for the help!
Hi there,
The way our infinite scroll work is it looks for the next page of posts using your normal WP pagination URL: /page/2
Then it grabs the posts and loads them without reloading the page.
If it's not working, it means your default pagination is broken.
I did some looking around and found this: https://wordpress.stackexchange.com/questions/172958/custom-permalink-structure-leads-to-be-404-on-pagination
It seems that permalink structure breaks pagination - perhaps one of the solutions there will help?
Hi Tom,
Thanks for getting back to me.
I've tried all solutions on that page as well as this one: https://meigwilym.com/fixing-the-wordpress-pagination-404-error/ and none have worked for me.
Is there anything else you would recommend?
I don't really want to alter any URL structures as this would impact on the rankings of pages.
What happens when you disable the infinite scroll ? Does that archive work correctly or do you get the issue that Mei Gwilym provided a fix for?
Please open a new topic for your question.
Thanks!
Hi David
No it still doesn't work even without the infinite scroll for some reason. The infinite scroll just never loads any more and the load more button loads then disappears without pulling any more posts to show.
I think that the previous solutions don't work because I have such a customer permalink structure on our blog.
Anything else at all that comes to mind would be much appreciated!
Hi there,
If you turn off infinite scroll completely (including the load more button), do your normal pagination links work?
Hi Tom,
Just tried this and they do on the general blog page but not when you're in a category for some reason.
Having trouble replicating the issue - have you changed the Category Base in the Permalink?
Hi David,
No it is still the same on mine.
So on this page for example I get a 404: https://cpdonline.co.uk/knowledge-base/food-hygiene/page/2/ but the first page is fine (https://cpdonline.co.uk/knowledge-base/food-hygiene/).
On the main blog page the pagination works here: https://cpdonline.co.uk/knowledge-base/ it's just the categories that don't.