YouTube has grown steadily over the years to a full scale powerhouse. You can now view videos on YouTube easily. This was not the case in the past because browsers could not handle such quality. However, with the ability of businesses to incorporate videos in their websites, customers can now get more information about the business via a video.

Embedding these videos was hectic at first but thanks to WordPress, website owners can now add YouTube videos in their websites with so much ease. With plugins that have proven to make work easier when embedding YouTube videos, websites can now share their content via videos.

In this article, we will be taking a look at various ways of embing a YouTube video in your website.

oEmbed

oEmbed uses a format that uses URLs to directly point towards embedded videos automatically. So what this means is that the URL of a video will be used to extract media and then it will be embedded on the website.

With oEmbed, you only need the URL of any YouTube video to embed on your webpage. What you need to do is simply open your post editor and paste that URL and the video will appear on your page.

If you also have playlists, this will work for you. Simply add the URL and your video will be embedded automatically.

Using the Embed Short code

There is only a word of caution when embedding YouTube videos using the oEmbed method and that is, the URL must be on its own line otherwise if there is any other text within the same line you will receive an error.

By using embed short code you can work around this restriction and still manage to embed videos.

Extending oEmbed Using Jetpack

With Jetpack your options while using oEmbed are much more. This means that you can customize how you embed videos on a webpage and this can be done by adding simple code at the very end of the URL that you intend to embed.

To use jetpack to embed videos, you first need to have the Jetpack plugin readily installed. After that, proceed to Jetpack and open Settings. Just next to Short code embeds is the Activate link. Click on it and you can now start including preferred parameters after the URL.

An example would be defining parameters that would customize the width and height of your embedded video. Remember, oEmbed has default parameters that it uses while embedding any particular video.

The short code would look something like this: [Your YouTube URL]&w=1920&h=1280.

As you can see, the parameters are separated by an ampersand after the URL. Jetpack’s documentation contains a full list of customizations which you can use for your video embeds. You can use as many customizations as you may wish. For example, what if we want to skip to a certain time of the video maybe because the video contains an advert at the beginning?

The customized URL will look something like this [YouTube URL]&rel=0&start=90&theme=dark

Something that you should consider is that there are no spaces between the parameters. The “rel” parameter defines remove related videos and it is set to zero. Then there are start and stop parameters that define what time to start and stop the video. The time used is measured in seconds. The last parameter included is the theme. You can either use light or dark theme, whichever that suits your style.

Embedding Using Vixy

Vixy is robust and is greatly preferred for websites that feature lots of videos. With Vixy there are potentially unlimited options for you. What Vixy does is that it provides you with numerous options that you can use to customize your videos while embedding them so that you have more control.

Vixy uses a short code,

Vixy enables you to create a playlist of selected videos that can be embedded on any webpage. The playlist will appear just as the usual YouTube playlist and a whole load of other amazing customization features.

If your website relies heavily on videos then Vixy will prove to be an excellent companion because it lets you have control of the videos you embed.

Conclusion

YouTube on WordPress is a common sight this days while embedding YouTube videos. It has become almost a necessity and with the introduction of various ways of how to achieve the same, it has now become easy to add videos on a webpage.


What Next?

Call us today and let us answer all your questions. We have been providing WordPress help for years now and have the expertise and experience to assist with any WordPress related issue.