Home | Articles | Wordpress | Add the “Next Page” Button to the WordPress Editor

Add the “Next Page” Button to the WordPress Editor

For years now, I have been using TinyMCE for WordPress to enhance the editor with some new buttons.  However, I only found myself typically using the “Next Page” button and never really touched any of the others.  I also noticed that some of the new functionality in WordPress 3.1 wasn’t present when using the plugin.  In the interest of keeping the “Next Page” button and losing the plugin, you can add some simple code to your functions.php file.

Just add the following code and enjoy:

// --------------------------------------------------------------------------
// Start Add NextPage Button
// --------------------------------------------------------------------------
add_filter('mce_buttons','wysiwyg_editor');
function wysiwyg_editor($mce_buttons) {
    $pos = array_search('wp_more',$mce_buttons,true);
    if ($pos !== false) {
        $tmp_buttons = array_slice($mce_buttons, 0, $pos+1);
        $tmp_buttons[] = 'wp_page';
        $mce_buttons = array_merge($tmp_buttons, array_slice($mce_buttons, $pos+1));
    }
    return $mce_buttons;
}
// --------------------------------------------------------------------------
// End Add NextPage Button
// --------------------------------------------------------------------------

Note: These functions are not of my own creation, simply things I have found along the way.  If you are the author of this function, please let me know so I can properly credit you with your work!

About Joe D

I have always had a passion for everything computing. In early 2000, I decided to take my passion to the web. Thus, C.O.D. was born. Through the years we have made many great friends at C.O.D. and hope to continue our journey for years to come.

Check Also

Manage Multiple WordPress Sites with InfiniteWP

Running your website, or websites, on WordPress is an easy choice as the flexibility the …

4 comments

  1. Moogestiltzkin

    thank you. Finally i managed to add in the next page quick tag.

    You should probably mention to the newbies out there that they can find the function.php under the wordpress theme folder they are currently using.

    Also to insert the code you mentioned at the top after

    < ? php 

    To confirm that it works, create a new post and see the new quick tag called page break which is basically the next-page tag used for the wysiwyg editor.

    Kudos

  2. Helped a ton, I forgot what the filter was for tinymce buttons!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.