Thursday, November 21, 2024
HomeWordPress TutorialsHow to Embed a YouTube Playlist in WordPress (Best Method)

How to Embed a YouTube Playlist in WordPress (Best Method)


Are you looking to embed YouTube playlists on your WordPress website?

Adding YouTube playlists to your blog posts and landing pages can increase user engagement and improve your search engine optimization (SEO). It also helps get more subscribers and grow your channel.

In this article, we’ll show you how to embed a YouTube playlist in WordPress.

Why Embed YouTube Playlists in WordPress?

If you want to make your content more engaging, then adding YouTube videos is a great way to grab your visitor’s attention.

There are a lot of benefits to embedding YouTube content:

  • You can keep people engaged and get them to spend more time on your website.
  • Video content helps boost your WordPress SEO, because the high engagement and low bounce rate send a positive signal to search engines.
  • It helps you to promote your YouTube channel and get more subscribers.

There are a few different ways to add YouTube content to your site. You could embed a single YouTube video, show the latest videos from your YouTube channel, or even create a video gallery.

So, why choose a playlist?

Embedding a playlist lets you keep the videos focused on a single topic.

A playlist also helps you to guide your visitors from one video to the next one in order, helping them to stay even more engaged on your website.

That said, let’s look at how you can embed YouTube playlists on your WordPress site.

Embedding YouTube Playlists in WordPress

WordPress by default does not allow you to embed a playlist. The easiest way to embed a YouTube playlist in WordPress is by using the YouTube Feed Pro by SmashBalloon plugin.

It’s the best WordPress plugin for YouTube and helps you create custom YouTube feeds for your website. It lets you add your YouTube playlists and offers lots of customization features.

YouTube feeds pro by SmashBalloon

The plugin automatically updates the playlist when you add more videos to it on YouTube. You can even embed live YouTube streams in WordPress.

For this tutorial, we’ll be using the premium version of YouTube Feed Pro because it offers more features. There is also a free version that you can use to try it out.

First, you’ll need to install and activate the YouTube Feed Pro by SmashBalloon plugin. Please see our guide on how to install a WordPress plugin for more details.

Upon activation, you can head over to Feeds for YouTube from your WordPress dashboard and then go to the ‘License’ tab.

Simply enter your license key and then click the ‘Activate License’ button. You can find the key in your account.

Enter license key

Next, you’ll need to go to the ‘Configure’ tab and connect your YouTube account.

To do that, go ahead and click the ‘Connect to YouTube to Create a Feed’ button.

Connect to YouTube to create a feed

A popup will now appear informing you that the plugin will require read-only access to your YouTube account to retrieve the API key.

Simply click the ‘Continue’ button to move on to the next step.

Click the continue button

Next, you’ll need to select your Google account.

Select Google account

On the next screen, the plugin will require access to your Google account.

Simply click the ‘Continue’ button.

Allow access to your account

You’ll now be redirected back to your WordPress website, and a popup will appear showing that you’ve successfully connected your account.

Go ahead and click the ‘Dismiss’ button to continue.

Successfully connected your account

Next to the ‘YouTube Accounts’ section, you can see that you’ve successfully connected your Google account.

See successfully connected notification

Now, you’ll need to create an API key so that the plugin automatically fetches your playlists and displays them in WordPress.

Let’s see how you can get an API Key.

Creating a YouTube API Key

You’ll first need to visit the Google Cloud Platform website and then login to your Google account.

After that, click on the ‘My First Project’ option at the top.

Click my first project

Now, you’ll see a popup window appear where you can select your projects.

Simply click the ‘New Project’ button to get started. You can also select an existing project if you want.

Create a new project

After that, you’ll need to enter a name for your project under the ‘Project Name’ field. We’ve called ours ‘YouTube Playlist’.

Then click the ‘Create’ button.

Enter name for a project

Once your project is created, you can click the menu option in the top left corner (3 horizontal lines) next to Google Cloud Platform and go to ‘API & Services’ from the menu.

Then click the ‘+ Enable APIs and Services’ option at the top.

Enable APIs and services

This will open the API library page. Go ahead and enter YouTube in the search box to find the YouTube API.

Next, you’ll need to select the ‘YouTube Data API v3’ option.

Select YouTube data API v3

After that, simply click the ‘Enable’ button to activate the YouTube API key.

Enable YouTube API

Now, you’ll need to go to the Credentials menu in the left menu, and then click the ‘+ Create Credentials’ at the top.

From the options that appear in the dropdown, go ahead and select ‘API key.’

Create API key

A popup window will now appear with the YouTube API key.

Simply copy the API key or store it on a notepad file.

Copy the API key

Next, you can head back to your WordPress website and then navigate back to Feeds for YouTube from your dashboard.

Now, go to the ‘Configure’ tab and enter your API key.

Enter API key

When you enter the API key, you’ll notice more options will be unlocked in Feeds for YouTube, including the ‘Select a Feed Type’ options.

You can now choose ‘Playlist’ as the feed type and enter the YouTube playlist ID. There is also an option to change the frequency that your site will check for new posts in your YouTube playlist.

Unlock feed type options

You can find the playlist ID by visiting your YouTube channel and then going to the playlist you’d like to display on your website.

The string of letters and numbers after the ‘=’ symbol in the URL is your playlist ID. Simply copy the ID and enter it in the Feeds for YouTube plugin.

Find YouTube playlist ID

Now that you’ve created an API key and added the YouTube playlist ID, let’s see how you can customize the feed and embed it on your website.

Customize and Embed Your YouTube Playlist

To customize your YouTube playlist feed, simply head over to the ‘Customize’ tab in the Feeds for YouTube plugin.

Here you can edit the width, height, and background color of your YouTube feed.

Edit width and height of feed

Next, you can scroll down and change the layout of the feed. The plugin offers multiple layout options, including a grid, gallery, list, or carousel type.

Besides that, there are also options for selecting the number of columns (for mobile and desktop), the number of videos, and spacing between the videos.

Change the layout

The plugin also offers more optional options to customize your YouTube feed. For instance, you can choose what info to display, like the play icon, title, views, date, and more.

There are also options for entering translations for info text, edit header options, changing the Load More and Subscribe button settings, adding moderation, and other advanced settings.

Video experience settings

Don’t forget to click the ‘Save Changes’ button when you’re done.

Next, you can now display your YouTube playlist on any WordPress page or post.

To start, simply create a new page or edit an existing one. Once you’re in the WordPress content editor, simply click the ‘+’ button and add the ‘Feeds for YouTube’ block.

Add Feed for YouTube block

Your YouTube playlist will now appear on your page.

Go ahead and publish your article to see the YouTube playlist feed in action.

YouTube Playlist preview

We hope this article helped you learn how to embed a YouTube playlist in WordPress. You may also want to check out our guide on how to start an online store and the best live chat software.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Embed a YouTube Playlist in WordPress (Best Method) first appeared on WPBeginner.





Source link

RELATED ARTICLES
Continue to the category

LEAVE A REPLY

Please enter your comment!
Please enter your name here


Most Popular

Recent Comments