How to split a long WordPress post into multiple pages

Jan 3, 2014

How to split a long WordPress post into multiple pages

Jan 3, 2014

With pagination you can split a single post or page into multiple pages for paged navigation. There are a lot of plugins available for the same, but WordPress comes with a built-in mechanism to accomplish this. Its better to do this simple task using this method in spite of it involving some manual work as it avoids the overheads (by plugins). It also gives you complete control over where the page-break occurs.

How to achieve this?

A very long post can take very long to load, slowing down your site. Also many readers prefer to have logical breaks while reading.

Pagination comes to your rescue. Here’s what to do:

While editing your page/post through the WordPress editor, you need to add

[code] <!–nextpage–>
[/code]

tag at the place where you decide to split the page.

Common mistake is adding the quicktag in visual mode. This will print it as it is and won’t split the pages as expected. So go the the text mode before adding the quicktag as shown below:

 

Now in text mode, add the quicktag wherever you decide it to be.

 

Publish and its done! The pagination will appear like this:

Compatibility Issue with themes

Sometimes pagination is successful but the navigation section does not appear. In other words, your page gets split but you don’t find any link to access them. This is because your present theme is unable to handle the tag for splitting the page. Its a small problem and can be fixed easily. Insert the following line to the theme’s template file.

[code] <?php wp_link_pages(); ?>
[/code]

Often the template file is called single.php. However some themes might not have a separate file for individual posts, and might utilize index.php itself. In this case you will need to edit this file.

For example, this is what we have set on our site.

[code] <section id=”body”>
<div>
<?php the_content(); ?>
<?php wp_link_pages(); ?>
<?php comments_template(); ?>
</div>
</section>
[/code]

We hope this post has helped you achieve a long post into multiple pages. Since, you’ll be amking changes in the templat file, consider taking a backup of your post. Use a backup plugin like BlogVault that backsup your whole and offers a range of other features.

4 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
lhurey
lhurey
6 years ago

I follow your instructions but it didn’t work….adding this to the post via text mode

didn’t work . adding this code to the themefile still didn’t work..can you help me please, I am using the them https://wordpress.org/themes/buttercream
and i try it on the other theme as well but still not working..

Stanley
Stanley
6 years ago

This plugin split long post into multiple pages automatically: http://www.webtivated.com/long-post-splitter/

KidWorldCitizen
KidWorldCitizen
5 years ago

Do you know how the page views are counted? For example, if I have a 3 page article, and I see that there were 21 views- does it mean perhaps 7 people clicked through all the way to each of the 3 pages, or does it mean 21 people opened the post and we don’t know how many clicks through were made?

editorbv
editorbv
5 years ago

Each page of a post will have its own page views count.

Share via
Copy link
Powered by Social Snap