Add Up to 16 Buttons to Your WordPress Visual Editor

Add Up to 16 Buttons to Your WordPress Visual Editor


The buttons on the WordPress visual editor are convenient, but perhaps you’d like a few more. You can place the following code into your functions file and add up to sixteen extra buttons. (Appearance > Editor > Theme Functions – functions.php)

Of course if you don’t want a particular button, then just delete it from the list.

function extra_editor_buttons($buttons) {
$buttons[] = 'fontselect';
$buttons[] = 'backcolor';
$buttons[] = 'image';
$buttons[] = 'media';
$buttons[] = 'anchor';
$buttons[] = 'sub';
$buttons[] = 'sup';
$buttons[] = 'hr';
$buttons[] = 'wp_page';
$buttons[] = 'cut';
$buttons[] = 'copy';
$buttons[] = 'paste';
$buttons[] = 'newdocument';
$buttons[] = 'code';
$buttons[] = 'cleanup';
$buttons[] = 'styleselect';
 return $buttons;
}
add_filter("mce_buttons_3", "extra_editor_buttons");

 

And here’s what it looks like with all the extra buttons:

If you’d like to make this code into a plugin, you can see how to do that here.

 

Photo: Vector glossy buttons from BigStock

Free Video Why 100 is NOT a Perfect Google PageSpeed Score (*5 Min Watch) Learn how to use Google PageSpeed Insights to set realistic goals, improve site speed, and why aiming for a perfect 100 is the WRONG goal.
Tags: