Pagination On A Single Post In WP

Quick Summary
- Split a long post by adding the nextpage tag in the classic editor's Text tab, or a Page Break block in the block editor.
- Add wp_link_pages() below the_content() in single.php, inside the Loop, to print numbered links to each page of the post.
- Many themes already call wp_link_pages(), so check first to avoid duplicate links; posts without page breaks are unaffected.
Long posts are easier to read when they are split into several pages, each with its own URL. WordPress supports this out of the box with a page-break tag and one template function. If you want links to the previous and next posts instead, see previous and next post links for single posts.
Step 1: split the post
Open the post in the classic editor’s Text tab and add this tag wherever a new page should start:
<!--nextpage-->Each tag starts a new page, so four tags split a post into five pages. In the block editor, insert a Page Break block, which adds the same tag.
Step 2: show the page links
Splitting the post is only half the job: visitors also need links to the other pages. Open your theme’s single.php (in a child theme, so updates don’t overwrite it) and add this line:
wp_link_pages();Place it right below the call that prints the post content:
the_content();wp_link_pages() prints a “Pages:” line with a numbered link to each page of the current post. It only outputs something when the post contains a page break, so your other posts are not affected. It needs to run inside the Loop, which is why it goes next to the_content().
Many themes already call wp_link_pages() in single.php or in a template part. Check first, or the links will appear twice.
Related articles
- numbered pagination for the blog index: for paging through lists of posts rather than one post
- why template tags need the Loop: the reason wp_link_pages() sits next to the_content()

