{"id":93439,"date":"2012-08-17T12:30:18","date_gmt":"2012-08-17T16:30:18","guid":{"rendered":"http:\/\/wpmu.org\/?p=93439"},"modified":"2012-08-16T12:05:33","modified_gmt":"2012-08-16T16:05:33","slug":"add-youtube-video-to-wordpress","status":"publish","type":"post","link":"https:\/\/wpmudev.com\/blog\/add-youtube-video-to-wordpress\/","title":{"rendered":"Beginner\u2019s Tip: How to Add a YouTube Video to WordPress"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-93441\" title=\"add-youtube-video-wordpress-big\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2012\/08\/add-youtube-video-wordpress-big.jpg\" alt=\"Post image\" aria-hidden=\"true\" width=\"613\" height=\"409\" \/><br \/>\nThere are two basic ways to add a YouTube video to your WordPress site:<\/p>\n<ol>\n<li>By pasting a link to the video page in your Post or Page<\/li>\n<li>By pasting the video\u2019s embed code in your Post or Page<\/li>\n<\/ol>\n<p>We\u2019ll go over both below.<\/p>\n<h2><strong>1. Pasting a Link<\/strong><\/h2>\n<p>Perhaps the easiest way to add a YouTube video to WordPress is by simply pasting in a link for the video on its own line in the editor.<\/p>\n<p><strong>Auto-Embed Settings<\/strong><\/p>\n<p>Before you try pasting your YouTube link into your site, you will want to make sure that you have your media settings properly set up.<\/p>\n<p>In order to do that, go to <strong>Settings &gt; Media &gt; Auto-embeds (check box)<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-93442\" title=\"media-settings-embed-video-links\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2012\/08\/media-settings-embed-video-links.jpg\" alt=\"Post image\" aria-hidden=\"true\" width=\"701\" height=\"350\" \/><\/p>\n<p>&nbsp;<\/p>\n\n<p>&nbsp;<\/p>\n<p><strong>Get YouTube Link<\/strong><\/p>\n<p>When your settings are correct, you can just get the link to the YouTube video you\u2019d like to embed.<\/p>\n<p>Probably the easiest way to do that is to click the \u201cShare\u201d button under the video itself. This will give you a shortened link to the video.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-93444\" title=\"youtube-copy-video-link\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2012\/08\/youtube-copy-video-link.jpg\" alt=\"Post image\" aria-hidden=\"true\" width=\"701\" height=\"630\" \/>If for some reason this shortened link doesn\u2019t work for you, you can get the long link by clicking on the \u201cOptions\u201d link under the shortened link.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-93445\" title=\"youtube-long-link\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2012\/08\/youtube-long-link.jpg\" alt=\"Post image\" aria-hidden=\"true\" width=\"701\" height=\"548\" \/><\/p>\n<p>(Note: It is possible to get the link from the address bar of your browser, but YouTube often adds extra information to this link that may make it unusable in WordPress.)<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Paste Link in Editor<\/strong><\/p>\n<p>Once you have your link, you can simply place it on its own line in your text editor wherever you\u2019d like the video to appear.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-93446\" title=\"youtube-link-wordpress\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2012\/08\/youtube-link-wordpress.jpg\" alt=\"Post image\" aria-hidden=\"true\" width=\"701\" height=\"400\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>And here\u2019s the result.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-93447\" title=\"youtube-video-in-wordpress-post\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2012\/08\/youtube-video-in-wordpress-post.jpg\" alt=\"Post image\" aria-hidden=\"true\" width=\"701\" height=\"688\" \/><\/p>\n<p>&nbsp;<\/p>\n\n<h2><strong>2. Pasting Embed Code<\/strong><\/h2>\n<p>The second option you have is to use YouTube\u2019s embed code. If pasting the link as described above doesn\u2019t work for you (even though it\u2019s supposed to), you may try using the embed code.<\/p>\n<p>Choosing to use the embed code also gives you a few other options that the plain link doesn\u2019t, including changing the size of the video.<\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p><strong>Getting the Embed Code<\/strong><\/p>\n<p>In order to get the embed code, click the \u201cShare\u201d button under the video and then the \u201cEmbed\u201d button. You\u2019ll then be able to configure the video\u2019s size and get the embed code.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-93448\" title=\"youtube-embed-code\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2012\/08\/youtube-embed-code.jpg\" alt=\"Post image\" aria-hidden=\"true\" width=\"699\" height=\"906\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Paste Embed Code<\/strong><\/p>\n<p>Once you have your embed code copied, go to the \u201cHTML\u201d tab in your editor and paste the code wherever you\u2019d like the video to show up.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-93449\" title=\"paste-youtube-embed-code\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2012\/08\/paste-youtube-embed-code.jpg\" alt=\"Post image\" aria-hidden=\"true\" width=\"699\" height=\"317\" \/><\/p>\n<p>And here again is the result, but in this one I\u2019ve made the video a custom size. By setting the width to 300 px, YouTube automatically set the height for me at 169 px, so the video stays in proportion.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-93450\" title=\"custom-size-youtube-video\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2012\/08\/custom-size-youtube-video.jpg\" alt=\"Post image\" aria-hidden=\"true\" width=\"699\" height=\"889\" \/><\/p>\n<p>And that&#8217;s it &#8212; two simple ways of adding a YouTube video to your WordPress site.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>These two methods of adding a YouTube video to your WordPress site are quick and easy.<\/p>\n","protected":false},"author":84404,"featured_media":93443,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"blog_reading_time":"","wds_primary_category":0,"wds_primary_tutorials_categories":0,"footnotes":""},"categories":[263],"tags":[2496],"tutorials_categories":[],"class_list":["post-93439","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-youtube"],"_links":{"self":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/93439","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/users\/84404"}],"replies":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/comments?post=93439"}],"version-history":[{"count":1,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/93439\/revisions"}],"predecessor-version":[{"id":216305,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/93439\/revisions\/216305"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media\/93443"}],"wp:attachment":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media?parent=93439"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/categories?post=93439"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tags?post=93439"},{"taxonomy":"tutorials_categories","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tutorials_categories?post=93439"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}