How To Stop Wordpress From Screwing Up Your HTML, with Global Content Blocks


This is Day 7 of the 30 Days, 30 Killer Wordpress Plug-ins Series.

If you’ve been using Wordpress for any decent length of time, you’ve probably experienced “editor hell”.

This is when you try to put some kind of formatted HTML, a form, some javascript… something like that…. into your Wordpress post editor, switch back to Visual view and then realize IT SCREWED UP YOUR CODE.

It is annoying. It has gotten better with some of the more recent versions of Wordpress, but it still happens. And, the reason it does this is for security reasons. There are security risks associated with allowing things like javascript code into the middle of a blog post.

Well, there is a solution. It is called Global Content Blocks.


This plug-in is supremely useful. It will allow you to insert anything into your posts/pages, such as:

  • PHP code
  • Any HTML, including forms, CSS, etc.
  • Iframes
  • Javascript code (i.e. Adsense code, etc.)

The content blocks are actually stored as a custom post type, making them independent of your actual content. This also makes them “global”. What does this mean? It means REUSABLE snippets.

When you want to insert a block into a piece of content, you will press the icon in your post editor. Up pops a dialog box which will list all the available content blocks. Here’s what I have:


As you can see, I’m using the plug-in mainly for opt-in forms. I can format the opt-in form any way I want and insert it. Now, I do have opt-in forms coded right into my theme, but Global Content Blocks is useful when I want to put in contextual opt-in forms. For example, the opt-in form on this very post (at the bottom) is being pulled in as a content block.

From a marketing standpoint, this allows flexibility in putting forms right where they need to be. For example, placing an opt-in form right into the post where you just told them why they should subscribe is a good idea.

Or… you could have a blog post about a product you offer, and embed an order form right into the content itself.

If you want to pull in another site inside an Iframe and embed it into a Wordpress page… you can do it with this plug-in.

I used to have to do custom page templates to do some of this stuff. So, this is a time-saver.

Check out Global Content Blocks. It is free, so knock yourself out. 🙂


Keep up with the latest in this 30-day series by staying connected!

You can enter your email below and I’ll keep you in the loop….

[contentblock id=11 img=optin.png]

Free Membership Will Get You...

Ability to participate in our forum community, access to exclusive downloads in the library, plus an exclusive subscription to THE EDGE. Sent each Monday, The EDGE will keep you on the cutting edge of Wordpress-based business.


  1. editor hell is putting it sweetly

    Lately, I’m noticing random span styles inserted that change the height of my text in a hand full of places, but leaves the rest of the post alone. This happens even if there’s nothing special going on in the post code-wise. Just make the mistake of switching from text to visual and BAM! A bunch of span-styles I have to go back and delete. It’s annoying.

Join The Community (For Free). You'll Get...​

Create Your FREE Account!

Join and participate in the community, access exclusive resources in the Document Vault, and get a free subscription to THE EDGE.

Your membership is free for life.