To quickly embed a YouTube or Vimeo video, simply copy the video’s URL from your web browser’s address bar while viewing the video: http://www.youtube.com/watch?v=JaN356Vpg-A Paste it on a line by itself in your post/page Visual editor (make sure that it is not a link!). You can view and play the video directly from the editor.  

Embedding with a Shortcode

To customize the video’s size and settings, use a shortcode. You can do this by copying the video URL, then create a shortcode using the format below. Be sure to replace the URL listed here with the URL of your video, and the code is on a line by itself. NB: The shortcode will not give you a preview of the video in your editor, you will need to Preview or Publish your post first. [youtube http://www.youtube.com/watch?v=JaN356Vpg-A] [vimeo http://vimeo.com/44633289] or [vimeo 44633289]

Embedding a YouTube Playlist

You can also embed a YouTube playlist instead of a single video. Simply copy the playlist’s URL from your web browser’s address bar while viewing the playlist. Be sure to copy the full URL, including &list=… at the end. That copies the entire playlist instead of a single video. Then, paste it on a line by itself in the post/page Visual editor or create a shortcode using the format below. Be sure to replace the URL listed here with the URL of your video, and the code is on a line by itself. [youtube https://www.youtube.com/watch?v=Dcz4vrC7uM8&list=PL0F4EAE74C95BF2A5] The playlist will look something like this and can be viewed and played directly from the editor.

 

 

 


Video Customization Options

You can specify the width and height of the embedded video by adding &w=... or&w=...&h=...to the shortcode. It will automatically adapt to your theme’s content length and give you preferred dimensions. You can disable related videos by appending &rel=0. For example, this shortcode: [youtube=http://www.youtube.com/watch?v=JaNH56Vpg-A&w=640&h=385] [vimeo 44633289 w=640&h=385] produces this video, which is wider than the default embed without width & height option settings.

More Examples:

  • To embed the video with default width and height adapted to your theme: [youtube http://www.youtube.com/watch?v=JaNH56Vpg-A]
  • To specify the width and height explicitly: [youtube http://www.youtube.com/watch?v=JaNH56Vpg-A&w=320&h=240]
  • To specify the width only: [youtube http://www.youtube.com/watch?v=JaNH56Vpg-A&w=320]
  • To hide the related videos from appearing after the video is done: [youtube http://www.youtube.com/watch?v=JaNH56Vpg-A&rel=0]
  • To start at a certain point in the video, convert the time of that point from minutes and seconds to all seconds, then add that number as shown (using an example start point of 1 minute 15 seconds): [youtube http://www.youtube.com/watch?v=JaNH56Vpg-A&start=75]
  • To specify a start and end time for a video, do the same as the above but add the end time as shown: [youtube http://www.youtube.com/watch?v=JaNH56Vpg-A&start=75&end=85]
  • To hide the top information bar: [youtube http://www.youtube.com/watch?v=JaNH56Vpg-A&showinfo=0]
  • To change the look of the player: [youtube http://www.youtube.com/watch?v=JaNH56Vpg-A&theme=light]