How to add Page Break button in WordPress Visual Editor

WordPress Tutorials

by 0

envato

I think if you use keyboard shortcut (Alt + Shift + P) to add Page Break will take longer than One Click.

Page Break (Next Page) button is not available in default WordPress Visual Editor  so  the insert  tag: <!––nextpage––> for Post Pagination becomes time-consuming.

This is how you can add Page Break button in WordPress Visual Editor for easy Split WordPress Posts into Multiple Pages with One Click.

how-to-add-page-break-button-in-wordpress-visual-editor

Add Page Break button in WordPress Visual Editor:

It’s very simple, you can add this code in your theme/child theme functions.php. Done!

/* Add Page Break Button in First Row */
add_filter( 'mce_buttons', 'my_add_page_break_button', 1, 2 ); // 1st row
 
/*Add Page Break button in WordPress Visual Editor */
function my_add_page_break_button( $buttons, $id ){
 
    /* Only add this for content editor */
    if ( 'content' != $id )
        return $buttons;
 
    /* Add Page Break button after Insert Read More tag button */
    array_splice( $buttons, 13, 0, 'wp_page' );
 
    return $buttons;
}

Leave a Reply

Your email address will not be published.

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=""> <s> <strike> <strong>