How to add styles and buttons to the WYSIWYG Visual Editor in WordPress
The Visual Editor in WordPress is great for clients. It lets them feel comfortable adding content with Word-like buttons that they are familiar with.
But, what happens when they want more font styles?
Although you can find plugins that add Quicktags to the HTML view Editor, such as Oren Yomtov’s Post Editor Buttons Plugin, I wanted to make adding content as easy as possible for clients by putting the extra styles in the visual editor instead.
I wanted to add one style to the list of default format styles: h1, h2, etc. but every time I tried some new code in my functions.php, it just wouldn’t show up correctly.
And then I gave in and saw what the massive TinyMCE Advanced plugin had to offer. I was hesitant to use it since it has so many options and I just needed to add one style but it turned out to be a quick and really easy way to add styles to the Visual Editor.
How to add custom styles to the TInyMCE Advanced Plugin:
- After you activate the plugin, go to the settings page and drag and drop the Styles dropdown to the row of buttons above.
- Go to the plugin files and in the CSS folder, open the tadv-mce.css file. Follow the examples that are there and add your styles to the list. It then looks to your theme’s stylesheet for the style definition.
- The styles then show up in the Styles dropdown in the Post or Page Visual Editor!
Category: WordPress as CMS








If we use WP 3.0, we can customize CSS style of post editor by using new function add_editor_style(). It will look for a file editor-style.css in theme folder and apply CSS rules for TinyMCE.
Rilwis,
That is such an awesome feature for 3.0. Good thinking by the WP developers!
Rebecca, Thanks! Nice tutorial!
Hey will that custom CSS file be overwritten when there is a plugin update?
Curtis, It’s very possible that the custom css file would get overwritten.
Success everybody with your wordpress!
Thanks for this article. I’m still having some issues adding custom styles, but am continuingg to play around with it.