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_varsorpagedhandling - Plugin conflicts or rewrite rules not flushed
🛠️ How to Fix
- Use
wp_reset_postdata()after custom loops - Make sure you’re using
query_posts()correctly (or better, avoid it entirely) - Call
max_num_pagesandpaginate_links()properly - 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.