Embedding Video the Easy Way with oEmbed. Sweet!
If video embedding has you flummoxed, keep reading…
To embed a video you used to have to copy and paste a big hunk of code in your WordPress post. Crazy, eh?
Well, no more searching for the embed code for your video!
WordPress 3.0 makes use of a dealie (technically a “protocol”) called oEmbed which will automatically transform your simple video link (i.e. http://www.youtube.com/watch?v=rfh4Mhp-a6U) into this:
All you have to do is take the URL (web address) of your video—something you can copy & paste from your web browser address bar—and paste it into your post. Simple!
Now, if you want a bit of control over the size of your video, you can add a little extra code, but it won’t hurt… Making the video 300 pixels wide looks like this:
aaannnd… it looks like this:
This nifty little dealie works with YouTube, Vimeo, Viddler, blip.tv or any number of other video hosting sites. Check out the WordPress codex for a full list.
Now, if you want to make all videos to be 300 pixels wide by default (that is, you don’t even have to do the embed code), go to Settings > Media on your dashboard and under the Embeds area, type in 300 for the width. Make sure you hit the save changes button to save that change. It’ll look a little like this:

So, no more digging and searching and hair-pulling (or crying for that matter) to figure out how to add video to your site!




Great tip, Alexia. So much easier than the old way. Thanks!
I am using the Vigilance Theme from the Theme Foundry and have been unsuccessful in embedding in my own 1an1 hosted sight. Any clues?
I’m also using Vigilance and have no problems… Make sure you’ve updated to the latest version (if you’re using the premium version, make sure both base and child theme are updated). And make sure WP is completely up-to-date.