Skip to content

How To Add Next Page Button To WordPress Post Editor

WordPress used to had a next page button to its TinyMCE post editor to simply put button to split the post into pages. All the functions for this button are still in the core and are loaded as well on the post editor, but the button itself is not added to the post editor, so we can easily bring back next page button to WordPress post editor with this snippet.

Just add following snippet to your current theme’s functions.php file:

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;
}

Leave a Reply

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