Embedding YouTube Clips Into Wordpress Without the Hassle!
For my Twitter Guide I needed to put a YouTube video inside a post. Easy right? Nope! I spent about two hours trawling the Internet for a solution and smacking my head against the desk! I’m going to show you the super-easy-hassle-free method to do it!
How It’s Normally Done
If you go to a YouTube page and have a look at the right of the screen, you’ll notice a text box labeled Embed. Here’s what it looks like:
![]()
Contained within that text box is a piece of code that you drop into the HTML of your page in order to display the video embedded with the page.
The Problem With Wordpress
Try to do that in Wordpress and it will completely screw up the display of your site - like totally! Here’s a screenshot to show you just what it does:

The Culprit
The problem is the default Wordpress visual editor. This thing here that many bloggers will be very familiar with:

See the visual editor ‘helps’ you out by inserting HTML code behind the scenes for stuff like bold, italic, images etc so you don’t have to do it manually. The problem is that it does not support the object tag which is required for the YouTube embedding so it messes up the code you inserted and thus messes up the layout of the page.
The Very Nasty Workaround
When first searching for a solution to this I discovered that there is an easy way to turn off the visual editor. Yipee! But wait, doesn’t that mean I have to edit my code directly? Yup. Ok I am a programmer I can handle it but sheesh, I don’t want to! There had to be a better solution than that…
The Fix That Doesn’t Work
Next I found that Wordpress comes with a very handy tag that allows you to embed YouTube directly using this format:
[ youtube=http://www.youtube.com/watch?v=PeJKQuvmDro]
Yeah, unfortunately that only works for a blog that is hosted by Wordpress, and not on your own domain. I struggled with this for ages! Note that in the above example I have inserted a space character between the opening square bracket and the start of the tag to prevent the actual embedding from taking place!
The Plugin That Works But Confused the Crap Out of Me
Finally I found a post which acknowledged that the bracket format did not work for self hosted blogs and offered a plugin that would do the trick. The problem was the instructions for this thing were telling me that I had to sign up for my own account at YouTube, add my blog to it, get some API key thing, and then post a video!! What??
[UPDATE] The link I originally posted (and the blog post I mentioned above) has now gone but the plugin is now available directly from the WordPress plugin database.
The Real EASY Solution
- Install the plugin
- Use the bracket notation
- Job Done!
Okay that’s it! The plugin works beautifully but I don’t know what the author was thinking with his instructions! I felt the need to make this post because posting the link on its own would have just confused all my readers as it did me!
Anyway, thanks to Robert for making the plugin and making my life so easy. And now, just for fun - some British humor to test this thing out…
If you are in any way offended by profanity, Star Wars, Lego or Eddie Izzard then DO NOT PRESS PLAY! Otherwise, go ahead :-)
If you've enjoyed reading this post then please subscribe to my Full Text RSS Feed.











Doug Hudiburg
November 7, 2007
Hi Caroline, thanks for these tips.
I’m guessing that the API and YouTube account thing is so you can easily just click ‘blog this’ and have the video added to a new post without any cutting and pasting. Just a guess, but that’s probably what that process does.
Doug