Broken Pagination – WordPress Daily Routine Broken Pagination


Categories

Broken Pagination

Archive or post navigation links don’t work due to permalink or query issues.

Broken Pagination

Key Points: Clicking page 2 of an archive results in a 404, infinite loop, or empty page.

Your blog says there are 10 pages. Page 1 works. But page 2? 404. Or maybe it loops back to page 1. Pagination is a surprisingly fragile part of WordPress, and it’s easy to misconfigure.

🕵️ Common Causes

  • Custom queries without paginate_links() support
  • Wrong query_vars or paged handling
  • Plugin conflicts or rewrite rules not flushed

🛠️ How to Fix

  1. Use wp_reset_postdata() after custom loops
  2. Make sure you’re using query_posts() correctly (or better, avoid it entirely)
  3. Call max_num_pages and paginate_links() properly
  4. Flush permalinks (Settings → Permalinks → Save)

💡 Extra Tip

Pagination problems often appear in themes that override queries without fully replicating default pagination logic. Check functions.php or templates carefully.