Pagination lets readers move through pages of posts or sections of a long article. This guide explains how to configure each type in WordPress.

Set posts per archive page

  1. Open Settings > Reading.

  2. Set Blog pages show at most to the required number of posts.

    blog pages

  3. Select Save Changes.

The theme must also display navigation between result pages. This setting does not add navigation to a theme that lacks it.

Add theme navigation

For a block theme, edit the archive template and check that its Query Loop contains a Query Pagination block.

For a classic theme, a developer can add the following after the main posts loop in the relevant child-theme template:

<?php
 the_posts_pagination( array(
     'mid_size'  => 2,
     'prev_text' => __( 'Previous', 'your-theme' ),
     'next_text' => __( 'Next', 'your-theme' ),
 ) );
?>

Replace your-theme with the theme’s translation text domain. This example uses the main query; custom queries need their own pagination configuration.

Pagination plugins may also need template integration; follow their documentation.

Split a post or page

  1. Edit the content and insert a Page Break block at each split.
  2. In the classic editor’s text or HTML mode, use <!--nextpage--> instead.
  3. Save and check the page links on the website.

The theme must support single-post page links. Classic themes normally display these using wp_link_pages().

Test navigation

Open the first, middle and last pages and check the displayed content. Investigate URL and permalink settings if links return 404 errors. Test suspected plugin conflicts on staging before changing the live site.