How to Embed a YouTube Video on Your WordPress Website?

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:

Step 1

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.

share and copy the link from YouTube

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.

Step 2

You may immediately embed a video by pasting the URL into the WordPress Gutenberg editor.

paste the URL in WordPress

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.

ELEX WooCommerce YoutUbe 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.

Install the plugin

Once the plugin is installed, click Activate Plugin.

Activate the 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.

plugin settings

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.

Create tab

  • 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.

live preview

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.

Customize settings tab

  • 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.

Settings tab

Configuration Settings

  • 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.

generate YouTube API key

  • 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 tab

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.

Gallery settings

Gallery 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. 

Copy shortcode

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.

paste the shortcode on WordPress

Simply paste the copied shortcode and hit update after that. It is as easy as that to embed a YouTube gallery on your website. 

front end display of the plugin in action


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.

Further Reading

Popular Tags

Blog Business Case Code Snippet Documentation ELEX Address Validation & Google Address Autocomplete Plugin for WooCommerce ELEX Amazon Payments Gateway for WooCommerce ELEX Payment Gateway for WooCommerce ELEX Bulk Edit Products, Prices & Attributes for WooCommerce ELEX Dynamic Pricing and Discounts Plugin for WooCommerce ELEX EasyPost Auto-Generate & Email Labels Add-On ELEX EasyPost Shipping Method Plugin for WooCommerce ELEX Google Product Feed Plugin ELEX Hide WooCommerce Shipping Methods Plugin ELEX ShipEngine Multi-Carrier Shipping & Label Printing Plugin for WooCommerce ELEX Shipping Plugin with USPS Postage for WooCommerce ELEX USPS Auto-Generate & Email Labels Add-On ELEX WooCommerce Abandoned Cart Recovery with Dynamic Coupons ELEX WooCommerce Australia Post Bulk Label Printing Add-On ELEX WooCommerce Australia Post Shipping Plugin with Print Label & Tracking ELEX WooCommerce Catalog Feed for Facebook & Instagram ELEX WooCommerce Catalog Mode, Wholesale & Role Based Pricing ELEX WooCommerce Choose Your Delivery Date Plugin ELEX WooCommerce DHL Express / eCommerce / Paket Shipping Plugin with Print Label ELEX WooCommerce DHL Express Bulk Label Printing Add-On ELEX WooCommerce Discount per Payment Method Plugin ELEX WooCommerce EasyPost Bulk Label Printing Add-On ELEX WooCommerce EasyPost Return Label Add-On ELEX WooCommerce Name Your Price Plugin ELEX WooCommerce Product Price Custom Text (Before & After Text) and Discount Plugin ELEX WooCommerce Bulk Label Printing Add-On ELEX WooCommerce USPS Shipping Plugin with Print Label ELEX WooCommerce Request a Quote plugin for WooCommerce ELEX WordPress Embed YouTube Video Gallery ELEX WordPress Embed YouTube Video Gallery Plugin FAQ Getting Started Knowledge Base Open Source HelpDesk & Customer Support Ticketing System – Simple & Flexible Plugin Integrations ReachShip WooCommerce Multi-Carrier & Conditional Shipping Plugin Shipping Plugins Uncategorized WooCommerce WSChat - WordPress Live Chat Plugin WSDesk - WordPress Helpdesk Plugin