All blog data on a page using custom query gives 404 for page 2 and onward
I initially thought you’re using the code in the question on a Page (a post of the type page), but if you are actually using that code on an archive-based page (e.g. the home page, a category page, etc.), then the 404 error is normal. You can’t paginate secondary/custom query on archive-based pages. Well, not … Read more