shopify agency of the year

Jan 27,2010 Shopify API

Embedding YouTube Videos, Flickr Images and more in WordPress 2.9

WordPress 2.9 has greatly increased the ease of embedding videos, images and other types of content. You are now able to display videos on your site from, for example, YouTube simply by entering the url of the YouTube video as plain text in a WordPress page or post. It is also possible to similarly embed videos from Vimeo, DailyMotion, Google Video and other video sites or embed images from Flickr and Photobucket. Embedding articles from Scribd or polls from PollDaddy is equally staightforward. A more comprehensive list of sites that you can embed from using this method is available at .

The example displayed below shows the post content in the admin (4 urls entered as plain text on a separate line - one from Flickr, one from Scribd, one from YouTube and one from PollDaddy) and the next two screenshots display the output on the front end of the site (a Flickr image, a Scribd article, a YouTube video and a PollDaddy poll).

This is all possible in WordPress 2.9 through it's support of the oEmbed protocol. This protocol enables your site to query another site for the code needed to embed parts of its content.

By default you are only able to embed content from a list of sites approved by WordPress. This can be extended by using the oEmbed Discovery plugin or, for developers, using the template tags wp_oembed_add_provider() (for allowing embedded content from an oEmbed-enabled site) and wp_embed_register_handler() (to enable embedded content from a non-oEmbed site).

If you would, however, prefer to prevent links from being converted to embedded content, this feature can be turned off under Settings > Media. There you will need to deselect the options labelled 'Attempt to automatically embed all plain text URLs' and 'Attempt to embed content from unknown URLs using oEmbed'.