Each theme should have configuration file package.json. Inside this file you can change - posts_per_page to high number - this will remove the pagination of the home page:
Hey setting the posts_per_page still does not remove the paginated pages for me.
So the issue is that I have infinite scrolling on all the pages, and still the paginated pages are coming. How can I remove those pages and make them return 404 or something.
Hey everyone! There’s no pagination output on the homepage of Ease theme, so there will be no pagination element on the frontend. However, there will always be paginated pages, because the homepage will be divided into pages depending on how many posts you have and the value of posts_per_page set in package.json.
So the issue is that I have infinite scrolling on all the pages, and still the paginated pages are coming.
Infinite scrolling is JavaScript based, so it’s possible to exclude the homepage when you initialize the script. The body element of the homepage has the class home-template.
If disabling the pagination is a must for your use case, you can set the posts_per_page to 0. It makes sure all posts are rendered without pagination, so there’ll be no paginated pages at all. Note that the posts in tag pages will also be output without pagination.
Hey @minimaluminium, so I made the posts_per_page to 0, but still my blog is rendering the paginated pages. /{tag}/page/2, and so on. Any way I can just stop these pages from getting rendered.