New in WP 2.9: Transform URLs to embed codes

| January 28, 2010 | Leave a Comment

A very useful new feature in WordPress 2.9 is oEmbed support, which lets you display video and other embed objects with less hassle: all you need to do paste the URL and you’re all set.

First, make sure this feature is enabled under Settings > Media > Attempt to automatically embed all plain text URLs. There’s also an option to set a maximum width and height for the embed objects. Next, create or edit posts like you normally would, and enter the URL in its own line. Save your post and hit the Preview button to check if it’s working.

For example, pasting a YouTube URL (http://www.youtube.com/watch?v=mKtdTJP_GUI) automatically generates this:

If you don’t want WordPress to create embed codes from URLs automatically, use the shortcode.

WordPress has a list of sites you can do this with, which includes sites like YouTube, Flickr, and WordPress.tv. More information about adding support can be found at the Codex page.

Related Posts

Tags: , , , , , ,

Leave a Reply