• Looking to start an Amazon Affiliate Store?

    Associate-O-Matic

How to Split a Post or Page into Many

How to mod your theme to make use of <!–nextpage–>.

To tell WordPress to make use of this code, you need to insert some additional code into “the loop” in two different places, usually in your theme’s page.php and single.php pages. Here’s the code: (please note that the quotes are not being rendered properly, DO NOT copy and paste this code, write it manually in your page.php file.)

<?php wp_link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>

I’m using the Structure theme by Justin Tadlock, here is a screen shot of where I’ve inserted the above code into the page.php file. I always put it right after the content.How to Break Posts and Pages into Many in WordPress

After adding this, I can now use the <!–nextpage–> Quicktag when writing a page to split it into multiple pages. Notice I said page and not post? If you want to break the “page” while writing a post, you will want to insert this into your single.php file as well.

In future posts, I’ll be adding more extensive examples of this features and how to display your pages list differently.

Has this been helpful to you? What’s you’re favorite little-known WordPress mod?

If you see fit, please share this post on StumbleUpon or your preferred social site.

This entry was posted in WP Mods (or Hacks) and tagged , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

14 Comments

  1. Posted January 30, 2008 at 11:38 am | Permalink

    Great tutorial, thanks!

  2. Posted December 18, 2008 at 2:17 am | Permalink

    Interesting. I am a real wordpress newbie but I am trying to learn.

  3. Posted December 31, 2008 at 10:55 am | Permalink

    Dear Sir,

    thank you very much for this great article! I have definitely problem with extra long articles and I will try to use your advice to corect the problems.

    keep on good work and Happy New Year :razz:

    Srecko Bradics last blog post..Last action hero

  4. ovevybycle
    Posted January 3, 2009 at 12:51 pm | Permalink

    okaingyficpfnczgwell, hi admin adn people nice forum indeed. how’s life? hope it’s introduce branch ;)

  5. Posted June 4, 2009 at 2:28 am | Permalink

    Thanks you Sir, you really save my times, because my new theme in my other blog doesn’t support quicktag, I love this new theme, yet most of my blog posts are very lengthy by which I have to split them all into several pages, and your tutorial really helpful and solved my problem, thanks again

    Software For Downloads last blog post..Download i-FunBox iPhone File Browser

  6. Posted June 20, 2009 at 10:08 am | Permalink

    Sounds great… your article is still loading however…. Your site is very very slow. Over 30 seconds to open the second page. Maybe time for a new host…. or push those videos to youtube!!!
    Ah the page has finished loading now. OK I’m off to mod the template!!! ;)

  7. Posted June 22, 2009 at 8:07 am | Permalink

    Hey Mark,

    I have been digging to see the cause of this…thanks for sticking with WPM:)

  8. Nick
    Posted August 13, 2009 at 2:45 am | Permalink

    A million thanks. I was searching the Wordpress Plugin library for a pagination module. I found one but didn’t work. So, I searched for spiting posts on Google. I found this wonderful article. No wonder I found only one plugin for something like this. There’s no need for a plugin. Just type in that nice little tag. Perfect!

  9. Posted August 26, 2009 at 9:54 am | Permalink

    Thanks a lot for the guide. I found it very helpful. It’s useful to break up long articles to help improve the readability on one’s site, I think. Thanks again.
    .-= Prostate Cancer Conquerer´s last blog ..Prostate Cancer Diagnosis and Symptoms =-.

  10. Posted October 10, 2009 at 1:50 pm | Permalink

    Soundz Gud … does it mean that wordpress creates a new page for the continued content or is it still on the same page and it rather acts like a quick scroll? I’m a bit confused (as newbies often are!!)
    .-= kansakare´s last blog ..BRCA1 or BRCA2 Genes, Aggressive cancer Of The Prostate, And Treatment =-.

  11. Posted October 28, 2009 at 10:44 pm | Permalink

    While writing a tutorial, discovered I couldn’t break up the page. While researching the issue, decided I’d write another tutorial to document my findings. Happy to have found your customizing site. Your same article then solved my next issue before I even knew I had it! (The theme I was using didn’t support pagination.) Gave a shoutout in the tutorial to you. Many thanks.
    .-= LocalBusinessCoach´s last blog ..Autoresponse Not Optional For Local Business =-.

  12. Posted November 26, 2009 at 11:27 pm | Permalink

    I’m no WP guru, so maybe you can help me out with this. I put the necessary code into the theme files. But in one page when I split it with it works correctly making two pages, but it doesn’t keep the font and formatting on the second page. (ie:blockquote) In another example it splits the first page but when you click to the second page it is not the second half of the text but the entire text (one page) as if it were never split. And also doesn’t have any link back to the first page. Any ideas?

  13. Posted November 29, 2009 at 9:03 pm | Permalink

    Thank you very much for this nice tutorial. Helped me enable pagination on my blog. :)

  14. ollivier
    Posted December 3, 2009 at 11:25 am | Permalink

    And how can I change the Meta Title to include %%page%% when using to split a post into multiple pages?
    Ex: How to Split a Post or Page into Many, Page 2

One Trackback

  1. [...] to Adam Warner of WordPress Modder for writing a definitive article, How to Split a Post or Page Into Many. Accessed October 25, 2009.  [go [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • Advertise Here

    Interested in advertising your site or service? Drop me a line here.