YouTube is one of the most widely known brands on the web, the video sharing site has surpassed viewership of the biggest TV networks anywhere in the world, even on mobile devices; recent statistics suggest that more than half of total views on YouTube come from mobile devices. That’s just another reason to optimize your WordPress sites for mobile, but also for the ability to scale mobile videos in your design. Video content has become big business, make sure you’re part of it.
Whether you are sharing your own video content, or are looking to complement your stories / content with videos that come from other sources, it’s vital that your WordPress blog supports easy video integration. Therefore, make sure that you display videos equally good for any type of device. Quite often people run into problems like videos having inappropriate dimensions and thus not displaying well for visitors. Embedding the right video format and size is important.
- How to embed a YouTube video in WordPress
- Making use of the YouTube embed code
- Displaying YouTube videos with WordPress widgets
- YouTube WordPress plugins
How to embed a YouTube video in WordPress
Luckily for WordPress webmasters and bloggers, WordPress comes equipped with a shortcode called embed. This literally allows you to embed any type of media from the web without having to use any extra plugins or code snippets. To simplify the process even more, WordPress core has built-in functionality that allows you to just share an URL of a video and it will automatically embed itself into the page. You can try to embed a YouTube video on your WordPress blog right now.
This is a commercial video for our popular MH Magazine WordPress Theme:
As you can see, it converts automatically when posting the link to the video.
The idea here is very simple. You link to the video which you want to display in the post, and it will appear automatically. There really isn’t anything else to it. However, the only thing you may want to do is adjust the height and width dimensions of the YouTube video, and this can be done using the embed shortcode in WordPress. This video has been scaled down to 400 x 225px:
The same video was displayed, only this time it was scaled down to the preferred height/width dimensions. And because the embed shortcode is universal in WordPress, you can apply any other tags; center, blockquote, code, and any other shortcodes you might be using on your site.
Making use of the YouTube embed code
What WordPress is doing with the embed shortcode is simplifying what YouTube already offers, the Share Embed feature. Each YouTube video has a tab underneath the title of the video that says Share, and upon clicking on this tab there is another tab that says Embed. Once you click on Embed, you will be presented with a piece of iframe code that you can directly copy/paste into your posts.
You have to click on the Show More tab to unfold all the options, especially if you want to select different video dimensions to use. That same feature panel will let you select additional features, such as whether to show player controls, or to display additional data like video title. You should also know that WordPress lets you embed from dozens of most popular video content sites in the world; see full list here. This gives you many possibilities to embed videos on your WordPress site.
Displaying YouTube videos with WordPress widgets
Another way of displaying YouTube videos in WordPress is by using a widget. You could either use a default WordPress Text widget and then use the WordPress embed shortcode or the YouTube embed code to add the video to the widget or you could check if your WordPress theme has included a suitable widget to display YouTube videos out of the box.
For example our very popular MH Magazine WordPress theme offers the MH YouTube Video widget which you can use to easily display YouTube videos in any of the available widget areas. Just copy & paste the watch code / video ID of the video into the widget and it will display your video right away.
YouTube WordPress plugins
The default method for embedding YouTube videos in WordPress is easy and simple enough for anyone to adapt to, but sometimes there are cases where you might want a little bit more customization options, as well as different ways to fetch different types of YouTube videos; such as playlists for example. For that, you can rely on numerous YouTube plugins that are available in the plugin repository. Whatever you’ve planned with video content, WordPress can make it happen.
Conclusion: Embed video content on your WordPress website
No matter how you decide to embed videos on your website, making use of video content can be highly beneficial for the success of your WordPress website. People love watching videos and it has become one of the most popular ways to consume online content. Are you already embedding video content on your website? What’s your favorite video platform? Or do you have any questions about embedding YouTube videos? Just let us know in the comments.
- Pull the Plug: Clker-Free-Vector-Images / Pixabay.com