Quickly make a gallery for a custom set of YouTube videos provided in the shortcode and autoplay video on click in the Magnific PopUp lightbox.
Jump to: Features | Download | Installation | Usage | FAQ | Support
Features
- Custom set of ID’s provided as shortcode attribute
id
(single or multiple ID’s separated by a comma) - Custom additional class for targeted styling (if you need to blend gallery in your theme)
- Custom number of columns to distribute thumbnails to (min 1, max 8)
- Responsive thumbnails
- Autoplay with Magnific PopUp lightbox
- Well-marked with classes (listed below)
Main container classes
.easy_youtube_gallery
.col-#
for the number of columns (default is1
, supported up to8
).ar-16_9
for 16:9,.ar-4_3
for 4:3 or.ar-square
for a 1:1 aspect ratio- custom class provided by shortcode attribute
class
Anchor classes
.eytg-item
.eytg-item-#
for order number of item.eytg-item-first
for the first item in the gallery block.eytg-item-mid
for middle items in the gallery block.eytg-item-last
for the last item in the gallery block
Thumbnail classes
.eytg-thumbnail
is the class for span where we set the video thumbnail as a background image
Play icon classes
.eytg-thumbnail:before
is pseudoclass for play icon
Download
ChangeLog you can find here.
You can download the plugin below or from the official WordPress.org page for Easy YouTube Gallery
Easy YouTube Gallery v1.0.5
51.12 KB
- Test on WordPress 6.7.1 and PHP 8.3.13
- Test on WordPress 3.9.40, Twenty Twelve 1.4 and PHP 5.4.45
- Fixed XSS vulnerability reported on patchstack by muhammad yudha researcher
- Refactor code
- Optimize play image
- Removed deprecated embed parameter modestbranding (more info)
Installation
- Login to your WordPress.
- Go to Plugins –> Add New.
- Type the keyword Easy YouTube Gallery into the Search Plugins field and press Enter on your keyboard.
- Click the Install Now button.
- When the plugin is successfully installed, click the link Activate Plugin.
- Insert shortcode (replace
YT_VIDEO_ID
with your set of YouTube video ID’s)
[easy_youtube_gallery id=YT_VIDEO_ID,YT_VIDEO_ID,YT_VIDEO_ID…,YT_VIDEO_ID]
How to Use?
[easy_youtube_gallery id=uMK0prafzw0,8Uee_mcxvrw,HcXNPI-IPPM,JvMXVHVr72A,AIXUgtNC4Kc,K8nrF5aXPlQ,cegdR0GiJl4,L-wpS49KN00,KbW9JqM7vho ar=16_9 cols=3 thumbnail=hqdefault controls=0 playsinline=1 privacy=1 class=mySuperClass]
Please note! If you copy and paste from the code above before you paste content to page, post or text widget content, clear all formatting by paste and copying to/from Notepad or another plain text editor!
Shortcode parameters
id
(required) single YouTube video ID or multiple ID’s separated with a commaar
(optional) aspect ratio of thumbnails; the default isar-16_9
for 16:9, but also supportedar-4_3
for 4:3 andar-square
for 1:1cols
(optional) for the number of columns to distribute thumbnails in; the default is1
, supported up to8
thumbnail
(optional) for the YouTube size of the thumbnail; the default ishqdefault
but we can use the following:0
have resolution 480x360px1
,2
and3
have resolution 120x90px (first, second or third frame)default
have resolution 120x90px (Default Quality)mqdefault
have resolution 320x180px (Medium Quality)hqdefault
have resolution 480x360px (High Quality)sddefault
have a resolution 640x480px (Standard Definition) and do not exist for low-res videosmaxresdefault
have a resolution 1920x1080px (Full HD) and do not exist for low-res videos
controls
(optional) to optionally hide playback controls in the lightbox player (default is1
that means “display controls”, but you can set it to0
to hide controls)playsinline
controls whether videos play inline or fullscreen in an HTML5 player on iOS. Learn more on Google Developersprivacy
(optional) enables enhanced privacy which means that YouTube won’t store information about visitors on your web page unless they play the video.class
(optional) to add a custom style class if you wish to target specific styling for your own needs
FAQ
Do I need to wrap shortcode parameters to double quotes or single quotes?
No. I even suggest that you avoid wrapping shortcode parameters to double/single quotes to prevent broken output when some plugins modify content with nasty filters.
Just avoid empty spaces between ID’s.
Support
If you need support for this plugin, please open the topic on the community forum.
If you find Easy YouTube Gallery useful for your project, please consider reviewing and rating it on WordPress.org, write an article on your blog/portal, or spread your happiness with your friends on social networks..