Home » Shortcodes » How to Display a YouTube Playlist on Your WordPress Website

How to Display a YouTube Playlist on Your WordPress Website

Welcome to this tutorial! Today, we’ll learn how to display a YouTube playlist on your WordPress website using a shortcode and Elementor. Let’s get started.
  1. First, log in to your WordPress admin dashboard. Once you're logged in, navigate to TemplatesSaved Templates. Select the template where you want to display the YouTube playlist.
  2. Next, click on the Edit with Elementor button for the selected template. This will open the Elementor editor, where you can make visual changes to your page
  3. Now, find the Shortcode widget from the Elementor widget library. Drag and drop it to the desired location on your page where you want the YouTube playlist to appear.
  4. Within the Shortcode widget, paste the following shortcode: [qb_youtube_playlist playlist_id="YOUR_PLAYLIST_ID" cols=3]
  5. Replace YOUR_PLAYLIST_ID with the playlist ID of your YouTube channel.

How to find the playlist ID?

  1. To locate your playlist ID, visit your YouTube channel and click on the Playlists tab. Then, select the playlist whose videos you want to display.
  2. Click on the View Full Playlist link or open the playlist in a new window.
  3. In the URL, you’ll see a parameter like this: list=<YOUR_PLAYLIST_ID>. Copy the value after list= – that’s your playlist ID.
Go back to Elementor, replace YOUR_PLAYLIST_ID in the shortcode with the actual playlist ID you copied. Once done, click the Apply button to save your changes. Finally, click the Publish button in Elementor to save your updates. Your YouTube playlist will now appear on the page you edited. The shortcode includes a cols attribute, which defines how many videos to display per row. The default value is 3 You can customize this to display 1, 2, 4, or 6 videos per row by updating the cols attribute in the shortcode. For example:
  • cols=1 will display one video per row.
  • cols=6 will display six videos per row.
Update the value based on your layout requirements and click Apply to see the changes. And that’s it! You’ve successfully added a YouTube playlist to your WordPress website. Now your visitors can enjoy watching your playlist right from your site.