How to split a long WordPress post into multiple pages

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

<!--nextpage-->

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:

WordPress Text Editor

 

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

WordPress nextpage tag

 

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.

<?php wp_link_pages(); ?>

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.

<section id="body">
<div>
<?php the_content(); ?>
<?php wp_link_pages(); ?>
<?php comments_template(); ?>
</div>
</section>
  • http://www.blognilhurey.com/ lhurey

    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

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

  • KidWorldCitizen

    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

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