How To Create Pagination In WordPress Posts

To break one post into multiple pages you have to use one of the hidden features of WordPress.

According to the WordPress Codex:
At one time there was a Next-Page quicktag button but it was deleted to reduce the clutter on the quick tag bar.

By breaking post up you increase post load time. This comes in handy if you are sharing 5,000 word short stories or news articles on your blog. It is also beneficial if your post has a lot of graphics. All you have to do is add

<!--nextpage-->

to your post where you want a new page to start. Watch the video below to see how to create pagination in wordpress by adding the Next Page quick tag to your post for automatic pagination of posts.

If your theme does not support pagination of posts you will have to edit your single.php. Before you edit any of your theme file backup your site first. Open your single.php file in a text editor such as Notepad++. Find content() and below it add:

<div><?php wp_link_pages('pagelink= %'); ?></div>

The pagelink argument tells WordPress what to make the link text. In the example above “%” represents the page number. You could also control what goes before and after by adding the following:

<?php wp_link_pages('before=<div id="page-links">&after=</div>&pagelink=%'); ?>

So now you know how to create pagination in WordPress.  Simply by using the Next Page quick tag you can break your post up into multiple pages.

Subscribe

Enter your name and email address to receive a 14 part e-mail series that will help you get the most out of your website.

Comments

    • There are a few strategies that can be implemented to improve page load speed. Google page load checker can be used to find recommendations for improving the speed of a website. But I expect as time goes on the loading speed of larger posts will improve.

Comments are closed.