Being a big fan of WordPress I thought I’d create a page with some tips and tricks. I am by no means a guru when it comes to the CMS. This page will simply be a collection of tips and tricks I’ve discovered or uncovered. I will add too it as I find things that I think will be useful to others.
Plus I wanted to have a place to go if I need to re-visit something. Hence the page 🙂
Add Extra Buttons To The WordPress Editor
The WP editor is great but it’s always been missing some features and options. Here’s a simple way to actually unlock some very useful buttons. For what ever reason extra, buttons have been there, but have not been active. For example, I’ve always wished there was a highlighter option, to highlight text. Well wish no more dude, now it’s possible.
With this code, the next time you load your wordpress editor, like when your making a post or page, the shiny new buttons will be available.
This code needs to be added to “functions.php” file for your theme. It’s highly advisable to add this to a child functions theme. Really. You should do that.
function enable_more_buttons($buttons) {
$buttons[] = 'sub';
$buttons[] = 'sup';
$buttons[] = 'fontselect';
$buttons[] = 'fontsizeselect';
$buttons[] = 'styleselect';
$buttons[] = 'backcolor';
$buttons[] = 'code';
return $buttons;
}
add_filter("mce_buttons_3", "enable_more_buttons");
IMPORTANT: You need to be VERY careful that you copy and paste the above code exactly as is into your theme’s functions.php file. Remember, use a child functions.php file. Any deviation or changing of the code can BREAK your WordPress site. If there is missing pieces of code it could cause some issues with your blog. Don’t say I did not warn you!
While you can not change the location of the buttons (not that I’ve found), you can re-order them, or add and delete them. For example if you want to ditch the “sub” button, just remove the $buttons[] = ‘sub’; code or line. To add new buttons, just use one of the button code lines, placing the name between the ‘ ‘ sections. Easy.
There are a ton of buttons to choose from, though most are either already displayed in the editor or not really necessary.
Here’s a complete list: TinyMCE button List
Will post more as I discover or remember 🙂
Ron Killian