ControlledChaos
7/4/2015 - 5:56 AM

Add page break button to visual editor for paginated posts

Add page break button to visual editor for paginated posts

<?php

function ccd_add_page_break_button( $buttons, $id ){
    if ( $id != 'content' )
        return $buttons;
    array_splice( $buttons, 13, 0, 'wp_page' );
    return $buttons;
}
add_filter( 'mce_buttons', 'ccd_add_page_break_button', 1, 2 );

?>

Add page break button to visual editor

WordPress Snippet