Canon EOS 60D - Celluloid by TempusVolat

Easy YouTube Gallery

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

  1. Custom set of ID’s provided as shortcode attribute id (single or multiple ID’s separated by a comma)
  2. Custom additional class for targeted styling (if you need to blend gallery in your theme)
  3. Custom number of columns to distribute thumbnails to (min 1, max 8)
  4. Responsive thumbnails
  5. Autoplay with Magnific PopUp lightbox
  6. Well-marked with classes (listed below)

Main container classes

  • .easy_youtube_gallery
  • .col-# for the number of columns (default is 1, supported up to 8)
  • .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

Installation

  1. Login to your WordPress.
  2. Go to Plugins –> Add New.
  3. Type the keyword Easy YouTube Gallery into the Search Plugins field and press Enter on your keyboard.
  4. Click the Install Now button.
  5. When the plugin is successfully installed, click the link Activate Plugin.
  6. 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!

View the Live Demo Here

Easy YouTube Gallery preview
Easy YouTube Gallery preview

Shortcode parameters

  • id (required) single YouTube video ID or multiple ID’s separated with a comma
  • ar (optional) aspect ratio of thumbnails; the default is ar-16_9 for 16:9, but also supported ar-4_3 for 4:3 and ar-square for 1:1
  • cols (optional) for the number of columns to distribute thumbnails in; the default is 1, supported up to 8
  • thumbnail (optional) for the YouTube size of the thumbnail; the default is hqdefault but we can use the following:
    • 0 have resolution 480x360px
    • 1, 2 and 3 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 videos
    • maxresdefault 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 is 1 that means “display controls”, but you can set it to 0 to hide controls)
  • playsinline controls whether videos play inline or fullscreen in an HTML5 player on iOS. Learn more on Google Developers
  • privacy (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..