Blog Posts

oEmbed: What it Means & How to Use it

22 Dec oEmbed: What it Means & How to Use it

Another shiny new feature in WordPress 3.5 is called oEmbed. In short, it allows us to embed media with just a URL (instead of an embed code). Isn’t it annoying when you have to click on “share” then grab an embed code from YouTube? Well, no longer!

This has actually been around since about 3.3, I believe, but with the recent upgrade there has been a ton of added support for sites such as Instagram. It’s this easy to use: find the URL of the media you want to embed, paste it in your post editor, and voila!

Let’s take a look at a YouTube video. On the back end you can see this:

oEmbed back end

But on the front end, you see the video (below)!

It’s really that easy. A couple things to note:

  1. The URL must be on its own line (it will actually work sometimes when it’s not, but it’s a bit spotty)
  2. Older themes need to wrap the embed code with the and end with short code to force WordPress to recognize an embed
  3. Check out the supported media sites by clicking here.
Tags:
No Comments

Leave a Reply