WP_Editor – Remove TinyMCE Toolbars

If I remember correctly, this should remove the toolbars on the tinyMCE:

function my_format_TinyMCE( $in ) {
    $in['toolbar1'] = '';
    $in['toolbar2'] = '';
    $in['toolbar'] = false;
    return $in;
}
add_filter( 'tiny_mce_before_init', 'my_format_TinyMCE' );

References:
https://codex.wordpress.org/TinyMCE
http://www.tinymce.com/wiki.php/Configuration

For the wp_editor, try applying these filter parameters onto your wp_editor() function.

Hope it helps.

** Edit

Also if that ['toolbar'] = false; still prevents you from uploading galleries, you could just try this instead:

$in['toolbar1'] = 'undo,redo'; 
$in['toolbar2'] = ''; 

(Just add a couple of buttons like undo and redo to the top toolbar and remove the second). I’ve just tested this and it works with adding galleries.

Leave a Comment