How to split pages in WordPress 2.5 with nextpage

May 1, 2008 – 8:50 pm

Problem: In WordPress 2.5.1, I was trying to make a multiple-page article using the <!–nextpage–> quicktag, but it wasn’t working.

Quick Answer: When you want a page break, switch to HTML/Code view and then type <!–nextpage–>.

Whole Story

As simple as this sounds, it took me 20 minutes to get this to work.  My problem was that I thought the usage was like other plugin quicktags, where you can just put it in anywhere.  But if you put in <!–nextpage–> while using the “Visual” or WYSIWYG editor, it will change your greater than and less than sign into the html entities.

The problem with having to switch to the HTML or code view is that I have to scroll down and find where my spot was in the article (if I am putting in page breaks after publishing).  It would be great if WordPress had a button on the writing toolbar, like the “More” tag, that would insert page breaks without having to switch to HTML or Code view, or worrying about whether you are in the right view or not.

This took me so much longer than it should have that this qualifies as a “computer problem that got in my way”.



Rate this article:


(No Ratings Yet)
Loading ... Loading ...

Advertisement:




  1. 13 Responses to “How to split pages in WordPress 2.5 with nextpage”

  2. I still can’t get my page break to work, even when I input that code in html view. Any other suggestions? It’s driving me crazy!

    By Shannon on Jun 6, 2008

  3. What happens when you put it in? Do you just see

    < !-nextpage->

    when viewing the page?

    (WP keeps putting a space after the open bracket, I don’t mean to put that there.)

    By Jake D on Jun 6, 2008

  4. You have to write , i. e. it must look like an HTML comment with an opening arrow, an exclamation mark, TWO hyphens, the text, another TWO hyphens and a closing arrow.

    By Stephan on Aug 20, 2008

  5. Sorry, it actually commented it out. It must look like (without the spaces)

    By Stephan on Aug 20, 2008

  6. Dammit, how do I insert that? >!--nextpage--&lt

    By Stephan on Aug 20, 2008

  7. <!--nextpage-->
    That’s it. Please ignore/delete the previous two comments.

    By Stephan on Aug 20, 2008

  8. Stephan, thanks for the help!

    By Jake D on Oct 6, 2008

  9. Hi,

    i came across your page searching for a solution to the same problem. By further research, I found out how to activate the pagebreak button in the visual editor. Thought you might be interested in this, too:

    In your theme’s function.php:

    By Jan on Feb 15, 2009

  10. [code][/code]

    By Jan on Feb 15, 2009

  11. <?php add_filter(’mce_buttons’, ‘add_nextpage’);

    function add_nextpage($buttons) {
    if (!in_array(’wp_page’, $buttons)) {
    if (!in_array(’wp_more’, $buttons)) {
    $last = array_pop($buttons);
    $buttons[] = "wp_page";
    $buttons[] = $last;
    }else{
    $txt = implode(’|', $buttons);
    $txt = str_replace(’wp_more|’,'wp_more|wp_page|’, $txt);
    $buttons = explode(’|', $txt);
    }
    }
    return $buttons;
    }

    ?>

    By Jan on Feb 15, 2009

  12. Finally! – Feel free to delete all those empty posts! ;)

    By Jan on Feb 15, 2009

  13. Jan,

    Thanks for that! This should make it quick and easy!

    By Jake D on Feb 15, 2009

  14. Very cool. Thanks for that! Just what I was looking for.
    I find it quite odd it was removed in the first place.

    By Jon on Mar 7, 2009

Post a Comment