Embedding HTML into your WordPress posts

If you own or  have a site on a WordPress Multiuser site, one of the limitations is that normal authors or editors can’t embed code into a post. You can get around this by installing the Embedit plugin.

You can embed code when you want to include any external data within a web page.  E.g. maps, slideshows and image galleries.

By default, unless you are site administrator, you cannot embed HTML code straight into a post. Don’t worry though, you just need to do it in a special way.

Note. This system will allow you to embed certain types of media automatically  just by pasting the URL into a post. This includes Youtube, Vimeo, Dailymotion and Scribd. A full list of compatible sites and an explanation is available here.

Embedding

First, you need to copy the source code you want to embed. This must be intended for embedding, you can’t just use arbitrary code.

E.g. On Google maps, use the Link function and copy the embed code:

  1. Click on the Link icon/link
  2. Copy the embed code
  3. Or, click the customise link to alter the zoom, size and map type

Google Map link dialogue

Now, while editing your post:

  1. Scroll down to find the Custom Fields widget
  2. Create a new custom field by adding HTM1 into the Name box
  3. Paste in the embed code into the Value box
  4. Click the add custom field button

Custom Fields (click to enlarge)

Now, in the main body of your post, type  [HTML1] wherever you want the embedding to take place.

Embedding (click to enlarge)

More embedding

If you have more than one item to embed in a post, simply use increments of the HTML1 name e.g  HTML2, HTML3 etc.

One Response to “Embedding HTML into your WordPress posts”

  1. [...] To embed the map into your post, see Embedding HTML into your posts [...]

Leave a Reply