On this episode, we will answer the question:
“How do I add a YouTube video to my WordPress website.”
Since the recent updates to the WordPress core, adding video content to your WordPress website has gotten incredibly simple. First, let me show you the ridiculously fast way to add a YouTube video. Copy the YouTube link, paste it into the WordPress post or page, and then save the draft, update or publish the page. Now sometimes this doesn’t work perfectly, so let me show you how to embed a YouTube video, but with all of the detailed steps.
Start by going to the page on YouTube with the video you want to embed. Under the video, click the “Share” button. Now click the “Embed” section. This will show the HTML code to paste into your website. Let’s customize this embedded content by clicking the “Show More” link under the code.
Now you have some additional options for the video embed. You can select a predefined size, or customize the size of the video. You can also choose the settings for whether YouTube shows suggested videos at the end, the YouTube player controls, the video title, and even disable YouTube’s ability to track visitors when the video isn’t played.
As you set these options, the HTML code above the video will automatically update. Select all of that code, and copy it to your clipboard. Now that you’ve created the HTML code you need, switch back to your WordPress editor. On the post or page visual editor, click the tab on the top right to switch from “Visual” to “Text” mode. Now you will see all of the HTML code for the content area of the page. If you aren’t familiar or comfortable editing HTML, hang on for the ride. WordPress makes it relatively simple.
Scan through the content to locate the place where you want to insert the video content. Click the mouse at the beginning of the line, before a new HTML tag, then press the enter key to add a new blank line, then the up arrow to go back to the new blank line. Press control or command V to paste the HTML code into place, or right click and select “Paste” from the menu. That will place the HTML code you copied from YouTube right into the page. Now, click the “Preview Changes” button in the “Publish” panel in the top right. This will open a new tab to show you the page with the embedded video. If everything looks good, click the “Update” button, or the “Publish” button if it is a new post.
The process in WordPress is the same whether you are embedding videos from Vimeo, Facebook or another site. You just have to get the right HTML code. In Vimeo, click the “Paper Airplane” icon to open up the sharing options. First, try the super fast method by copying the URL and pasting it into the WordPress editor. If that works, you’re all set, but let me show you the details.
Under the “Embed” section, click the “Show Options” link to customize the player that you will embed. Vimeo gives you some different options than YouTube, so customize those to your liking. Click the mouse into the code area, select the code, and copy it to your clipboard. Press control or command C to copy the HTML code, or right click and select “Copy” from the menu. It’s the same process as before. Scan through the content to locate the place where you want to insert the video content. Click the mouse at the beginning of the line, add some space. Press control or command V to paste the HTML code into place. Click the “Preview Changes” button in the “Publish” panel in the top right to see if everything looks good. And then finish with the “Update” button or the “Publish” button.
This basic process will work for practically all types of HTML content that you want to embed onto your WordPress site.