ZeroToWP

Pagination

Quick Definition

Pagination splits a long list of posts or content into multiple pages with navigation links — like page numbers or next/previous buttons — so visitors can browse through content without loading everything at once.

WordPress Pagination documentation in the Theme Handbook on developer.wordpress.org

What Is Pagination?

Pagination is the system that splits content across multiple pages and provides navigation to move between them. In WordPress, you encounter pagination in two places:

  • Archive pages — Your blog, category archives, tag archives, and search results. WordPress displays a set number of posts per page (default: 10, configurable in Settings > Reading) and adds "Previous" / "Next" links or numbered page navigation to browse the rest.
  • Within a single post — You can split a long article into multiple pages by inserting the <!--nextpage--> tag in the content. WordPress then shows "Page 1, 2, 3..." links at the bottom of the post.

WordPress provides several functions for displaying pagination in classic themes:

  • the_posts_pagination() — The recommended function (WordPress 4.1+). Outputs numbered page links with previous/next arrows in one clean block.
  • next_posts_link() and previous_posts_link() — Simple previous/next links for archive pages. More control over placement.
  • paginate_links() — Lower-level function for maximum customization. Used when you need full control over the output HTML.
  • wp_link_pages() — For navigating between pages within a single multi-page post.

In block themes, pagination is handled by the Pagination block — a component of the Query Loop block. You can choose from page numbers, previous/next buttons, or both, and style them visually in the Site Editor without touching code.

Pagination in Practice

The most important setting for pagination is the "Blog pages show at most" value in Settings > Reading. This controls how many posts appear per page on your blog, archives, and search results. Setting it too high (50+) makes pages slow to load. Setting it too low (3–5) creates too many pages and frustrates visitors. Most sites use 10–15 posts per page.

For SEO, paginated archive pages should remain indexable — each page contains different post excerpts, making them unique content that search engines can crawl. Google handles pagination natively and does not require rel="next"/rel="prev" tags (Google deprecated those in 2019). However, you should ensure that your paginated URLs have proper permalinks (like /blog/page/2/) rather than query strings.

Infinite scroll and "Load More" buttons are alternatives to traditional pagination. They keep the visitor on a single page by loading additional posts dynamically — often using the REST API or admin-ajax.php. These feel more modern but can hurt SEO if the dynamically loaded content is not accessible to search engine crawlers.

Why It Matters

Pagination directly affects user experience and SEO. Without it, archive pages would try to load every post at once — killing page speed and overwhelming visitors. With well-configured pagination, visitors browse content comfortably, search engines index your archives properly, and your server handles traffic efficiently.

Sources

Related Terms

Related Articles