Raw HTML Plugin – What to Use When You Want to Write HTML and Shortcode Examples in Your WordPress Post

In my last post, I used a lot of code examples in HTML, WordPress’ Shortcode, and the WordPress Video Plugin’s codes. If you have ever tried this before, you quickly realize that WordPress will immediately process the code as actual code that you want to implement, making the text that are your examples disappear, and actually implementing them. This is extremely frustrating.

For example, I just wanted to post the general format for the code to embed a youtube video useing the WordPress Video Plugin:

[youtube id]

Instead, I got this:

As you can see, WordPress immediately implemented the code.

How do you stop this?

Install the Raw HTML Plugin.

After you install the Raw HTML Plugin, if you want to have the code not get implemented, enclose that code in raw tags:

[raw] your code [/raw]

Now, there are at least two catches to this.

Catch Number 1: You cannot type brackets(such as [] or <>) inside the raw tags. Instead, you need to use HTML Entities (sometimes referred to as special characters – you can find a good list here).

To actually make the code above appear on the screen and not get implemented, for:

&#91;youtube id&#93;

I actually typed:

&amp;#91;youtube id&amp;#93;

Catch Number 2: Do not use the “Visual” tab when editing your post. If you do, all of the entities that you carefully typed will disappear.

Raw HTML will not take care of everything for you, but it does make things much easier.

Leave a Reply

Your email address will not be published. Required fields are marked *