Skip to content

Embedding Video the Easy Way with oEmbed. Sweet!

2010 June 30
by Alexia

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!

3 Responses leave one →
  1. Tzaddi permalink
    July 1, 2010

    Great tip, Alexia. So much easier than the old way. Thanks!

  2. January 30, 2011

    I am using the Vigilance Theme from the Theme Foundry and have been unsuccessful in embedding in my own 1an1 hosted sight. Any clues?

    • Alexia permalink*
      January 31, 2011

      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.

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS

CommentLuv badge

Bad Behavior has blocked 156 access attempts in the last 7 days.