When I was first looking for a Youtube Plugin to suit my needs, it took me nearly half a day to find one. The best plugin to make a Youtube video gallery in WordPress I found is called “Youtube Channel Gallery” by Javier Gómez Pose. The plugin uses a shortcode to display videos on your WordPress page. One video is shown in full size, and the others are shown as a thumbnail. When you click on one of the video thumbnails, this video is shown in full size and starts to play. Using this plugin, you won’t have to update your page to include your latest videos, as they will be added automatically!
Table of Contents
Installing the YouTube video gallery plugin
To install the plugin, click ‘Plugins’ and then ‘Add new’. Search for ‘Youtube Channel Gallery’. The first result is the plugin you need. Click the ‘Install Now’ button to install it.
When it’s installed, click ‘Activate plugin’ to activate it.
Using the plugin
This plugin doesn’t create a page in the WordPress dashboard menu bar in the left, and only allows you to use it by using shortcodes in your posts or pages. To find out more about using this plugin is by going to your installed plugins on WordPress (Plugins → Installed Plugins), and clicking ‘View Details’ to read the documentation.
You can also access this documentation by going to https://wordpress.org/plugins/youtube-channel-gallery.
How to make a Youtube channel Gallery
Add a new page to WordPress, and copy the following shortcode to your page:
[Youtube_Channel_Gallery feed="user" user="YouTube_Channel_name" feedorder="desc" videowidth="500" ratio="16x9" theme="dark" color="red" quality="default" autoplay="0" rel="1" showinfo="1" maxitems="9" thumbwidth="212" thumbratio="16x9" thumbcolumns="3" title="1" description="1" thumbnail_alignment="top" descriptionwordsnumber="10" link_window="0"]
Replace ‘YouTube_Channel_name’ in the above code with the name of your Youtube channel.
For instance, Microsoft’s YouTube channel is “https://www.youtube.com/user/Microsoft“. Whatever follows “user/” is what you need to enter as your “YouTube_Channel_name”.
Once you’ve entered the shortcode, click ‘Update’ to update your WordPress page. Your page now has a YouTube channel gallery on your WordPress site.
Note; this code is using my preferred settings, but you can customize the look and functionality by adjusting the shortcode. See the Other shortcode options paragraph.
How to make a Youtube Playlist Gallery
To make a WordPress page with only the videos from a certain playlist, copy the following code to a WordPress page:
[Youtube_Channel_Gallery feed="playlist" user="Playlist_ID" feedorder="asc" videowidth="500" ratio="16x9" theme="dark" color="red" quality="default" autoplay="0" rel="1" showinfo="1" maxitems="9999" thumbwidth="212" thumbratio="16x9" thumbcolumns="3" title="1" description="1" thumbnail_alignment="top" descriptionwordsnumber="10" link_window="0"]
This code uses feed=”user” instead of feed=”playlist”. Then, instead of naming a YouTube username, add a playlist ID. For instance, a playlist by Microsoft, titled ‘Microsoft at CES 2012’, has the following URL: https://www.youtube.com/playlist?list=PLB42286429D18E2ED.
Whatever follows ‘/playlist?list=’ in the URL, is the playlist ID. Copy this, and replace ‘Playlist_ID’ in the shortcode.
Other shortcode options; customize your video gallery
You can make changes to the shortcode to make it function differently. I’ll highlight some of the changes you can make here. For the full documentation on this, go here.
- Feedorder: You can change the feedorder to show the latest video in your first (ascencing order), or the first video first (descending order). With playlists, it sometimes makes more sense to show the first video first. To change it from the default ascending to descending order, use feedorder=”desc” in your shortcode.
- Theme. You can choose either a light or a dark theme for the YouTube video player. By default, this is dark, just like on YouTube.com itself. With the light theme, the video player is light grey. To change to the light theme, use theme=”light” in your shortcode.
- Progress bar color. This changes the color of the bar for the part of the video you’ve already seen. By default this is in red, just like on Youtube itself. You can change this to white, which looks pretty good with the light theme. To change to the white progress bar, use color=”white” in your shortcode.
- Video quality. Here you can change the video quality for the videos. You can use small, medium, large, hd720, hd1080, highres or default. Using default will let YouTube pick the best size based on your internet connection. However, if you want to only display the videos in higher quality, like 720p, you can for instance change your shortcode using quality=”hd720″.
- Autoplay. You can change whether you want the video to automatically play. Using autoplay=”1″ in the shortcode, the video will autoplay, using autoplay=”0″, autoplay will be turned off. I prefer not using autoplay, as it generally annoys me when something autoplays.
- Show related videos. Use rel=”0″ in your shortcode to not show any related video suggestions at the end of your video, or rel=”1″ to show related videos. If you don’t want your visitors to be distracted from your content, definitely go for no related videos!
- Number of videos to show. Enter the maximum amount of videos you want to show on your page. I often use maxitems=”9999″ in the shortcode to make sure it shows all of my videos.
- Thumbnail alignment. This determines the location of the thumbnail in respect to the video title and text. You can choose between left, right, top or bottom. For instance, to use the thumbnail on top, use thumbnail_alignment=”top” in your shortcode.
- Thumbnail width. This allows you to change the width of the video thumbnails. If you’re using top or bottom thumbnail alignment, it’ll automatically make the thumbnails wide enough to exactly fit next to each other side to side. However, you’ll still have to set a high thumbnail width for this thumbnail resolution to be high. For the other alignment options, this dictates how wide the thumbnails are. For instance, using thumbwidth=”90″ in your shortcode will make the thumbnails exactly 90 pixels wide. The height is calculated automatically by the aspect ratio.
- Thumbnail columns. This determines the amount of video’s that are displayed side to side in your gallery. For instance, using thumbcolumns=”3″ in your shortcode gives you 3 columns of videos.
That’s it! You now know how to add a YouTube video gallery to WordPress using this awesome plugin!
Or maybe not? If you couldn’t make it work, leave me a comment. In most cases, I’m able to help you out.