There are some functionalities in WordPress, which very few people know about, and so is this new trick. Do you ever wanted to divide a single post in two different pages, well, now you can. With this code, you can split up a single WordPress post into multiple pages. The outcome would be that in a single post, you will be able to place pagination.
Split WordPress Posts into Multiple Pages
Sometimes you may think that a particular post is too long, and you may end up by writing that post in two parts. Now you don’t need to write a part 1 and part 2 for that post. Just directly type in the below code, and pagination will be automatically added at the end of the post. You can place this code wherever you want the next page to start.
<!–nextpage–>
This is also called Page-Link tag. Whenever you want a page break to appear, just place your cursor there and type in this code. Yes, its this simple. You probably didn’t thought that its this simple. This code is very useful for a long post, and you can make two or more pages out of a single post.
Now whenever you view the site, you will be able to see Page Numbers as links, in the bottom of the post. This will look something like this:
Pages: 1 2
If you’re on Page 1, then page 2 will be a link, and you can click on page 2 to open the next page. And vice versa if you are on Page 2, then Page 1 will be shown as link. You can place this Page-Link tag anywhere in a post, and whenever you wish to divide the page.
In most cases, this code should work without any problem. But if pagination is not showing up in your posts even after placing that next page tags, then you’ll need to add the following code in your single.php loop:
<?php wp_link_pages(); ?>
This is a superb way to divide a WordPress post into different pages. Now whenever you think to write about that long topic, split that post into multiple pages to offer your readers a good reading experience.
If you’re interested in changing the look and tweaking this Page-Link, then view this official codex.
Canberra says
Thanks for sharing knowledge about Page-Link tag. It is very simple then I thought. I probably didn’t thought that its this simple.The amazing thing was it is very useful for a long post, and you can make two or more pages out of a single post….thanks again.
Mrinmay Bhattacharjee says
hmmm. Cool Post.
It’s just like <!–more–> tag