View Categories

How to Open YouTube Videos in a Gallery Window

You can use the MetaSlider Gallery plugin to show YouTube videos inside a pop-up window.

You can enhance your YouTube videos with a gallery window. Visitors can view your videos and then open them inside a modal. This can make the video larger and also darken the background so it’s easier to see the video.

There are two approaches to adding a gallery window to your YouTube videos: Automatic Mode and Manual Mode.


Under the “Automatic Mode” tab, you can select where the gallery will be enabled automatically. Check the box for “Videos in post content” to apply the gallery automatically to YouTube embeds.

Settings for the Video Lightbox
  • This video below is a demo of how the YouTube video will appear. Click the orange button in the top-right corner.

Manual Mode for Video Galleries #

The second option is to use “Manual Mode”. This allows you to choose which individual videos will open in a gallery window. This feature works with the WordPress block editor. Let’s see how to add a gallery window to videos that are added via a block.

  • Select the video you want to use with MetaSlider Gallery.
  • In the right sidebar, click the “Advanced” tab as in the screenshot below.
  • Add ml-lightbox-enabled to any existing text in this box.
MetaSldier Gallery CSS class