A YouTube video’s creation is only half the battle. It’s time to share what you’ve created after the arduous production process by putting it on Facebook, email newsletters, and of course, your website. In the past, embedding YouTube videos on WordPress required some ingenuity or other plugins.
However, after the introduction of WordPress 2.9, that has changed. In actuality, all you need to embed YouTube in WordPress is the YouTube link. To be more creative with your integrations, you could want to make galleries, embed your full YouTube page, or compile a collection of films from other people.
Benefits of embedding YouTube Videos in your WordPress
It might be advantageous to include a YouTube video on your website. Consider a scenario in which your website addresses a challenging subject. Then, to make the issue more understandable to your audience and to clarify its significance, you might have someone explain it on video.
The benefits of embedding a YouTube video over just uploading it to your WordPress site are storage and speed. Your loading time will rise, and your website will be more difficult to load if you upload the video directly to your WordPress editor. This is bad since it increases the risk of a website crash when there is high traffic.
Now that we understand the importance of embedding a YouTube video, let us take a look at the process of doing so in this article.
Directly embed a YouTube video using WordPress Gutenberg Editor
A fun function known as embeds was added to WordPress in version 2.9. Without the need for any additional plugins or settings, you can now just copy and paste YouTube videos into your website. Here’s how to go about it:
Take note of the video’s URL and copy it. The YouTube share link button or the address bar of your browser both allow you to copy the URL.
By initially checking the “Start at” box and selecting a time, you may utilize a clever and practical approach to have the video automatically start at a specific point. Copy the URL after that.
You may immediately embed a video by pasting the URL into the WordPress Gutenberg editor.
Embed a YouTube video gallery using ELEXtensions
You may quickly and easily make your video gallery from your videos with the ELEX WordPress Embed YouTube Video Gallery Plugin.
You may use the YouTube API to automatically sync individual videos, playlists, and even whole YouTube channels to your website, and it allows you to display completely customized YouTube videos on your website in the form of a gallery.
Start by installing and activating the plugin. In order to do so, download the plugin and go to WordPress Dashboard > Plugins > Add New and click Install Now.
Once the plugin is installed, click Activate Plugin.
You have two options for accessing the settings of the plugin after it has been installed and activated:
- WordPress Dashboard > YouTube Gallery
- Dashboard > Plugins > Installed Plugins is where the ELEX WordPress Embed YouTube Video Gallery’s settings are located.
The plugin settings are divided into four tabs: My Gallery, Create, Options, and Help & Support. Let’s start configuring the plugin.
Step 1: Create Tab
By including video URLs, playlist URLs, or channel URLs to the source list under the Create tab, you may build galleries, change the layout, and examine it in advance.
- Gallery Name: Give the new gallery a good name by typing it here.
- Gallery Category: Choose an appropriate gallery category here. If you are working with many galleries, this category will help you organize and categorize them. It won’t be visible to website visitors, though.
- Add Source URL: To add a video or videos to your gallery source list, copy the YouTube video, playlist, or channel link, paste it, and then click “+Add To Source List.”
- Live Preview: The gallery’s appearance on the live site is shown in the live preview section.
The above provided fields are easy to understand and can be customized according to your requirements. The Live preview section will be filled up with the videos you add. A screenshot of the same is provided below.
Once you have completed the above steps, you may move on to the Customize menu on the right-hand side of the screen. The menu includes the following functions.
- Source List: All the playlists, channels, and videos that have been uploaded to the related gallery are listed in the Source List. By selecting the Remove button, you may delete the galleries, playlists, and videos from this page.
- Color Mode: Depending on the layout of your website, choose between the bright mode and the dark mode for color.
The next section in the same menu is the Desktop layout. The sub-menu includes the following:
- Show Header: You have the option of showing or hiding the header text that appears at the top of the gallery.
- Columns: Decide how many columns to display in the specific gallery.
- Rows: Choose how many rows to display in the specific gallery.
- Pagination: Choose the sort of pagination you want to see at the gallery’s bottom by clicking on it. Simple and Classic are the two options, and they feature the previous and next buttons as well as the numerical page options respectively.
After the Desktop layout section, the Customize menu includes the following settings.
- Subscribe Button: Select whether you want the Subscribe button to appear at the top of the gallery and if so, enter the channel URL. Users who click the subscribe button will be sent to the specified YouTube channel.
- Intro Video: To add an intro video, turn on the Show Intro Video option and enter the URL of the clip you wish to serve as the gallery’s opening video.
In the live preview area, you may see a preview of each modification. Click Save Changes once you have finished customizing the parameters.
Step 2: Settings Tab
Configuration Settings, Video Player Settings, and Gallery Settings are the three sub-menus that make up the settings tab. By default, these options will apply to all of your galleries, but they may subsequently be changed by altering the settings for specific galleries. Let’s go through each of them in detail.
- YouTube API Key: Enter your YouTube API key in this field. Click here to generate your API key. Click Create Credentials on this page. You’ll be sent to the Google Cloud Console after the redirect. Click Create Credentials > API Key on this page.
- Auto Sync: Activate the Auto Sync option to regularly sync your YouTube channel or playlist so that your gallery is always current.
- Time Interval: The time interval drop-down option will show when auto-sync is enabled. The interval at which you want the gallery to automatically sync may be adjusted here. The choices include daily, once every seven days, once every 15 days, and once every 30 days.
- Use Default Settings: Reverts the configuration settings to their default values by removing the API Key and other preferences.
Video Player Settings
- Show Video Title: Select this if you want the video’s title to be seen above the playback of the file.
- Play Mode: Pop-up and inline play styles are both available.
- Pop-up: When you click on the video, a pop-up window appears, and it begins to play.
- Inline: Instead of opening a new pop-up window, the video plays directly within the gallery arrangement.
- Overlay Color: Choose an overlay color to be used on the video player.
- Overlay Blur: For the video player’s overlay blur, enter the appropriate value.
Now let us move on to the last section under settings.
You may specify the default global gallery settings on this tab, which can then be changed on an individual basis.
- Show Header at the top: To display the gallery name at the top of each gallery, enable this option.
- Show Subscribe Button: Enable this option to make the Subscribe button visible at the top of each gallery.
- Channel URL: When a user clicks the Subscribe button, they will be forwarded to this URL, which is the channel URL.
- Color Mode: Based on your preferences and the layout of the page, select either the light or dark mode.
- Gallery Layout: Decide how many columns and rows you want to see in each gallery.
- Pagination Type: Select the Simple & Classic or Numerical pagination type, which will show a previous & next page or a numerical page (as discussed above).
In the live preview area, you may see a preview of each modification. After making all the necessary adjustments, click Save Changes.
Now that we have understood all the settings and functions of the plugin, let us demonstrate the plugin in action. To illustrate, let’s add a video gallery to one of our website pages.
Start by going to the plugin settings and clicking the My Gallery Tab. Under this tab we will find a list of all the galleries we created.
Next to the desired gallery, copy the shortcode from the Shortcode column.
On the backend of your website, start by editing the page you wish to add the video gallery to. Click the “+” button, then select Shortcode, on the block editor.
Simply paste the copied shortcode and hit update after that. It is as easy as that to embed a YouTube gallery on your website.
Your website will benefit from the value that videos add to your content. Despite the fact that you may upload your videos, embedding them is advised. We really hope that this post has shown you how to quickly integrate YouTube videos into a WordPress website.