Removing options from the editor

4.60K viewsUpdates
0

Can I reduce the number of styling options users see in the WYSIWYG? (ie. only letting them use ‘bold’, ‘italic’, ‘underline’, ‘bulleted/numbered lists’ and ‘hyperlinks’)

1

I do it this way and it works. Add this code to the functions.php:

 

add_filter("mce_buttons", "tinymce_editor_buttons", 99); //targets the first line
add_filter("mce_buttons_2", "tinymce_editor_buttons_second_row", 99); //targets the second line

function tinymce_editor_buttons($buttons) {
return array(
    "bold", 
    "bullist",
    "numlist"
    );
}

function tinymce_editor_buttons_second_row($buttons) {
   //return an empty array to remove this line
    return array();
}

Also, I use this plugin, to prevent changes being lost with theme updates and only run on front-end: Code Snippets

Code Snippets is a must have, great advice!
Thanks Chema.

You are viewing 1 out of 1 answers, click here to view all answers.