YouTube

Media

Videos » YouTube

, , ,

To quickly embed a YouTube video, simply copy the video’s URL from your web browser’s address bar while viewing the video:

And paste it on a line by itself in your post/page editor:

We take care of the rest! The video will look something like this:

Embedding with a Shortcode

If you’d like to customize the video’s size and settings, you’ll want to create a shortcode. To do so, copy the video URL:

Paste the URL on a line by itself in your post/page editor. Then create a shortcode using the format below. Be sure to replace the URL listed here with the URL of your video.

[youtube=http://www.youtube.com/watch?v=JaNH56Vpg-A]

↑ Table of Contents ↑

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
  • You can turn on the search box by appending &showsearch=1

For example, this shortcode

[youtube=http://www.youtube.com/watch?v=JaNH56Vpg-A&w=640&h=385]

produces this video:

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 show the YouTube search box:
    [youtube=http://www.youtube.com/watch?v=JaNH56Vpg-A&showsearch=1]

↑ Table of Contents ↑

Video

Watch the “Embedding YouTube videos into your WordPress.com posts” video from WordPress.tv.

Embedding YouTube videos into WordPress.com posts

Embedding YouTube videos into WordPress.com posts

↑ Table of Contents ↑

Comment Embeds

You are able to embed actual YouTube videos into comments that you leave on any WordPress.com blog.

To embed a video in a comment, simply grab the URL of any YouTube video and paste it directly into your comment:

Once your comment is posted/approved, you will see the YouTube video and be able to watch it directly from there.

↑ Table of Contents ↑

Troubleshooting

With the first method (URL copy & paste), make sure the YouTube link is not hyperlinked. If the URL is shown in blue, as the first line in the screenshot below, then it is hyperlinked. Simply select the whole URL and click the “Unlink” icon on your Visual Editor toolbar.

Unlink YouTube URL

Once the URL is unlinked, you will see the text in black. You should then be able to see the embedded YouTube video on your page or post.

Was this Helpful?
1007
1600
  • Share this:

Last modified: December 20, 2010