How to Embed a YouTube Video in WordPress – Classic Editor and Gutenberg
Are you wondering how to make your website look more animated? Then adding a video to it might be a good idea. If you want, you are free to use any video that you find on YouTube, or you can upload your own.
There are a few different ways to add a YouTube video to WordPress – both in the classic editor and Gutenberg – and this time around, we’ve decided to show them all.
Embedding a YouTube video in classic editor
Here are the steps for the easiest way to embed a video from YouTube:
- First, log into your WordPress. Then, go to the page/post you want to add video to and find a place where you want to add it in your content.
- Go to YouTube, find the video you want to add and use the full URL in your browser’s location bar:
The other way to copy your URL is to select the Share option below. Afterward, simply click the Copy button, and you have successfully copied the URL of the video.
We have to note that there is one awesome option that allows you to set your video to begin at a certain point. Just check the Start at box and add the time that you want your video to start from.
- Now, go back to your page/post and simply paste the URL address (blank paragraph is a great place to do so), and the preview of the video will appear. Like this:
- Now, all that is left to do is click the Update button, and your video is finally live and will appear on your page or post.
If you need more advanced options, like changing your video’s display size, here’s another way to add it:
- Select the Share button located below your video. This will make the Embed option appear.
- Copy the HTML code:
- Paste it here (make sure to use the Text editing mode):
- Hit the Update button, and that’s it! You are now able to edit the width and height of the video. You can find it in the HTML code you have copied.
Embedding a YouTube video in Gutenberg
Gutenberg editor comes with embed blocks that allow you to insert content from other sources, including videos. There is also a specific block for YouTube videos, which you can find in your Gutenberg block list.
You should know that YouTube block only allows you to insert the URL of the video.
Therefore, if you want to insert an
<iframe> element and some other attributes, you will have to do it in the text block.
That completes all the different ways of adding YouTube video into your WordPress page or post. Try it out to make your content appear more colorful, attractive and informative!