Videos » YouTube
- Embedding with a URL
- Embedding with a Shortcode
- Video Customization Options
- Comment Embeds
Embedding with a URL
To quickly embed a YouTube video, simply copy the video’s URL from your web browser’s address bar while viewing the video:
Paste it on a line by itself in your post/page editor (make sure that it is not hyperlinked):
We take care of the rest! The video will look something like this:
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.
Video Customization Options
You can specify the width and height of the embedded video by adding
&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
For example, this shortcode:
produces this video, which is wider than the default embed without width & height option settings:
- To embed the video with default width and height adapted to your theme:
- To specify the width and height explicitly:
- To specify the width only:
- To hide the related videos from appearing after the video is done:
- 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):
- To specify a start and end time for a video, do the same as the above but add the end time as shown:
You can embed YouTube videos when you leave comments on any WordPress.com blog. Simply grab the URL of any YouTube video and paste it directly into the comment field:
Once your comment is posted/approved, you will be able to watch the video directly from the comment area.
- Make sure the YouTube link is not hyperlinked. If the URL is shown in your theme’s link color (as the second line in the screenshot below), then it is hyperlinked. Simply select the whole URL and click the “Unlink” icon on your Visual Editor toolbar.
Once the URL is unlinked, you will see the link text in black.
- Make sure to place the YouTube URL or shortcode on its own line. This means there should be no character or whitespace before or after the URL/shortcode.