maryyyyyyy
maryyyyyyy

Reputation: 127

Configure or remove an item from tinymce menu bar in wordpress

Is it possible to remove these items from the menu bar in visual editor in wordpress?

I'm using a tinymce advance plugin.

I already used this code to remove the formats, but for those two I'm not sure about the key to it. Unlike formats, it uses block_formats.

function custom_tinymce_formats( $init ) {
    $block_formats = array(
        'Paragraph=p',
        'Heading 1=h1',
        'Heading 2=h2',
        'Heading 3=h3',
        'Heading 4=h4',
    );

    $init['block_formats'] = implode( ';', $block_formats );
    return $init;
}
add_filter( 'tiny_mce_before_init', 'custom_tinymce_formats' );

enter image description here

Hope someone can help me! Thank you very much.

Upvotes: 0

Views: 208

Answers (1)

maryyyyyyy
maryyyyyyy

Reputation: 127

I just added this code:

$init['removed_menuitems'] = 'wp_page, wp_more';

Upvotes: 1

Related Questions