WordPress Blog Pagination Not Working

cpcdev picture cpcdev · Sep 22, 2015 · Viewed 15.2k times · Source

I'm still stuck on this issue..

The pagination on my WordPress blog is not working - http://www.example.com/news

When you click a different page number it updates the URL (and page title) correctly but it does not show different posts.

Ive tried:

  • Disabling all plug-ins
  • Changing the permalink structure
  • Changing the number of blog posts displayed in Settings>Reading
  • Changing http://www.example.com/recall-news to a different path to avoid conflicting with a post category named "news"

Nothing has worked for me.

I've seen many solutions for a custom query, but I'm using the posts page that you set in Settings>Reading>Posts Page so I did not write any code to display the posts on this page.

  • What WordPress file do I modify to fix the blog pagination in this case? I'm guessing I can add something to functions.php, but I haven't found a solution yet.

UPDATE: I have not found the solution yet. I know I can do it by writing my own query but I want to stick with the default WP blog.

Answer

Kordaki picture Kordaki · Sep 22, 2015

Check your WP loop in the category.php file (aka archive.php). It must contain the following:

if (have_posts()) : while (have_posts()) : the_post();

and finished with:

endwhile; endif;