Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

Post Pagination – How to Split WordPress Posts into Multiple Pages

Last updated on by
Special WordPress Hosting offer for WPBeginner Readers
Post Pagination – How to Split WordPress Posts into Multiple Pages

Yesterday we wrote an article on the site showing you how to increase pageviews and reduce bounce rate in WordPress. One of the tips we mentioned was splitting long posts into multiple pages. You can see an example of how we split our posts into two pages or even into five pages. After writing that article, we got a lot of inquiries from people asking us multiple questions. How do you split the posts into multiple pages? I put the <!––nextpage––> tag, but no pagination shows up. Well worry not. In this article, we will show you how to split WordPress posts into multiple pages.

Video Tutorial

If you don’t like the video or need more instructions, then continue reading.

On most well-coded themes, all you have to do is paste this code: <!––nextpage––> wherever you want the next page to start. The pagination will automatically show up. Note: make sure that you are using the Text view rather than Visual view in your post editor.

If for some reason, pagination is not showing up after you have pasted the next page tags, then you would need to add the following code in your single.php loop.

<?php wp_link_pages(); ?>

Once you add that, then the pagination will start to show. There are several parameters for this function that you can use. The codex page for Styling Page-Links does a good job explaining that.


Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »

Comments

  1. Anthony Franck says:

    This is really cool and it worked, kind of. The page numbers are super ugly and there is a “glaring inconsistency”.

    I did see that your demo site list25 has beautiful red squares, I was wondering how you went ahead and created the nice squares?

    Would it be possible to make a demo for that and send us the link?

    Also About halfway through my setting this up on my website it struggles to handle the page breaks. They are all there but putting 12 jpegs between 12 page breaks freezes up my website and it won’t allow me to load anymore images on the post. Has anyone had any issues with this crashing the database? Thanks in advance for any help

    • WPBeginner Support says:

      You can see the List25 CSS by right clicking on the page navigation and select Inspect from browser menu.

  2. Dave says:

    I’d just like to say, before anyone clicks the link in this comment, it is NSFW.

    Now, on to my question.

    Here is the page I want to split into multiple:

    My problem is, there are around 80+ posts on that page already. How can I manually add a next page/next post/more to the page so that it can be split into multiple pages, instead of showing every single post and every single image on 1 page?

    It makes it awful inconvenient. It also forces the page to take forever to load. Try it out yourself. See how long it takes to load.

    Can anyone assist? What WP code can I use to break the page up? Everything I see mentions “posts” and not “pages”, unfortunately.

    • WPBeginner Support says:

      Your WordPress theme should automatically handle this. It seems like either your plugin or a plugin you are using is lazy loading or pre-loading all the posts. Visit Settings » Reading page. There you can select how many posts you want to show on your blog pages. If it is already set at 10 or less, then this means you should check your plugin and themes. If it is set to a much higher number then you can change that here and save your settings.

  3. apachx says:

    Whenever, I insert the nextpage tag in the HTML of the post I get the page number at the bottom of the post area. But, the problem is that some other plugins like author box and wordpress related posts are being shown before the page numbering which makes it invisible to readers.

    Is there any way to put the page numbering just below the post area e.g. below adsense link unit in the post area?

  4. me says:

    Very Bad idea

    user really hate to click 1 – 9 and 9- 1 just to read it

    u maybe think about How to Increase Pageviews and Reduce Bounce Rate

    but user will just close the tab

    • Dyc3r says:

      You can use “Next/Previous” instead of page numbers with the following:

      `wp_paginate_links( array( “next_or_number” => “next” ) );`

      Incidentally, this is my biggest issue with the core function. There’s a glaring inconsistency between `paginate_links()` and `wp_link_pages()` in that the latter forces you to choose between numbers and next/previous.

      Granted, since this is designed to flip between pages of a single post versus pages of an “archive”, the number of available pages will (or should) be relatively low, but it would be nice to have a little more flexibility similar to what we get with archive pagination

  5. besty says:

    Nice post, it worked for me but how do i make the Next Page appear immediately after the post instead of after the related post? what i mean is that my site related Posts showing before the Next Page Link.

    How can you help?
    thanks

  6. Val Archer says:

    Hi – I’m using index.php for my posts which are all one-per-page. doesn’t work for me, so I added just below the loop in index.php but it still doesn’t work. So I saved index.php as single.php because you mention “you would need to add the following code in your single.php loop.” So I figured maybe it works only in single.php but not in index.php?

    But now I can’t find where to tell wordpress to use single.php as the template for blog posts! I have a static front page. The page “Posts — Posts Page” does not give the option of choosing a template. Somehow once upon a time I told it to use the “Template Name: IndexMine” for posts. But I don’t know how or where!

    Please can you tell me how I can tell wordpress to use single.php for blog posts? Then hopefully will work? Thank you!

    • Dyc3r says:

      If I understand your issue correctly, you’re actually using this function in the wrong place. Think of your site like a library/bookstore where each post is a book.

      — `posts_per_page` determines how many books you put on a shelf.
      — `wp_link_pages()` will turn the page in the book you are currently reading
      — `paginate_links()` will move to a new shelf

      It sounds like you want to move to a new shelf, in which case, `paginate_links()` is the function you need

  7. Maran says:

    I was thinking if there a way to do it. You guys rock. I am glad that I am following on twitter.

  8. Ali says:

    My website contains long post and used to split them into multiple pages using ALT+SHIFT+P and this works well on my desktop theme, but when I installed WPtouch plugin I see 1 2 3 pages and when I click on any of them it reloads page no 1 .
    How can i fix this problem ?

  9. James says:

    But I also dont want to index 2nd and 3rd page and how to solve pagination in wordpress.

  10. Brent says:

    What if you have a featured image and only want it to show on the first page but not on pages 2, 3, 4, etc.?

  11. Shubham Mundra says:

    I am using MH Magzine Pro theme. When I put the nextpage tag between the article it only shows 123…. number. I want to do it like this Pre 1 2 3 Next. Is this possible?

  12. John says:

    “If for some reason, pagination is not showing up after you have pasted the next page tags, then you would need to add the following code in your single.php loop.”

    What code?

  13. Aaron says:

    nope not working at all for me… ugghhhhhh whyyyyyyy

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.