I have seen several premium WordPress themes providing extra shortcodes for embedding Youtube and Vimeo videos. Most of the theme authors do not know that this function is already present in WordPress core. This function is powered by oEmbed.
Using oEmbed you can avoid the process of copying and pasting HTML from the site hosting your videos i.e. Youtube, Vimeo etc. You can read more about WordPress implementation of oEmbed here.
How to embed Youtube videos using oEmbed shortcode
An example usage of the shortcode: [embed]type-your-youtube-video-url-here[/embed]
You can also specify the width and height of your video.
An example usage of the shortcode using width and heigh attributes: [embed width=”300″ heigh=”300″]type-your-youtube-video-url-here[/embed]
You can also use oEmbed shortcode with the following websites:
- YouTube
- Vimeo
- DailyMotion
- blip.tv
- Flickr
- Viddler
- Hulu
- Qik
- Revision3
- Scribd
- Photobucket
- PollDaddy
- Google Video
- SmugMug
- FunnyOrDie.com
Although oEmbed may seem great…it’s very limited. All you can do is insert a video and set its dimensions.
You cannot customize its behavior or appearance and what’s worse…oEmbedded videos are always fixed-width so they will break/overflow the website layout in mobile browsers or in elastic/fluid layouts.
If you need the best Youtube plugin for WordPress check “Youtube shortcode” -> http://wordpress.org/extend/plugins/youtube-shortcode/