Home How to How to show YouTube videos in a lightbox

How to show YouTube videos in a lightbox

184
0

YouTube videos in Light Box is in trend nowadays.Learn how to put YouTube videos in Lightbox.
Lightbox is a JavaScript library that displays images and videos by filling the screen, and dimming out the rest of the web page.In simple terms when clicked upon the lightbox text or button it will come on the screen diminishing the webpage in the background.
A lightbox can contain all the elements in javascript from text ,image to video.
In this post we will show you how you can add youtube videos in your lightbox.

Steps for Displaying YouTube Videos in a Lightbox

Following are the steps to add a YouTube video to a light box, using the WP Video Lightbox plugin.

    1. First, install the WP Video Lightbox plugin. From inside the WordPress Dashboard, click on Plugins, then Add New.
    2. Do a search for WP Video Lightbox. Click Install Now, and then Activate.
    3. This time, rather than getting a YouTube Video URL ready, we just need the ID, which is the part after the v= in the video URL Video URL. Get that now before continuing.

Now add the video in lightbox

 

  1. Create a new Post by clicking Posts, then Add New.
  2. Add a title for your post, and in the content area add the lightbox shortcode. As seen on the video or below the written instructions, the shortcode is as follows: type an open square bracket, then type video underscore lightbox underscore youtube, then a space, then video underscore id, then equals, then open quote, then paste in the Video ID from the previous step, then close the quotes, then a space, then width equals open quote, the desired value, then close quotes, then a space, then height equals open quote, the desired value, then close quotes, then a space, then auto underscore thumb equals open quote, the number one, then close quotes, and close the square bracket.
  3. Save and test.

Comments

comments