Press "Enter" to skip to content

Tag: TinyMCE

Keeping Code out of the WordPress Text-Editor

I’m sure we’ve all seen this at least once. Maybe it’s the aftermath of a poorly estimated project charging right towards a deadline. Or perhaps it stems from a quick fix at eight in the evening from an overworked developer. It might even be the client’s attempt at re-gaining control of his own site no thanks to the suspiciously cheap development he paid for overseas.

Either way, it’s a bad idea no matter the reason. What am I talking about? I’m talking about HTML and inline styles in the WordPress text editor. Bad, bad, bad!

Feel guilty yet? No worries, I’ve been there. And learning from my own mistakes, I’d like to share a few reasons why this practice should be avoided. Then I’d like to offer some solutions to keeping code out of the WordPress text-editor and instead, leaving it where it’s safe within the theme templates.

4 Comments

How to Remove TinyMCE Buttons

I recently read a blog post by Tom McFarlin titled, Remove TinyMCE Buttons. For the confused, TinyMCE buttons refers to the buttons available in WordPress’ text-editor toolbar for formatting and styling your content. Here’s more on how to use the text-editor along with learning to love the text-editor.

Anyway, it never occurred  to me that I could remove TinyMCE buttons. Tom McFarlin’s blog post inspired me to try it out. Since his blog post was more of a guide through the thought process of completing the task rather than a literal walk-through, once I resolved the mystery, I wanted to share it with others. So here is how I went about it – how to remove TinyMCE buttons step by step with images, code, and further explanation.

Before We Begin

  • You should take a look at Tom McFarlin’s blog post as I’ll be referring to it as my guide to writing code
  • Get your theme’s functions.php ready as that will be what we’ll be working in ( or plugin file, wherever you’re keeping your custom functions )
  • Just to future-proof this tutorial as reference, using WordPress 4.0 when this was written
6 Comments