The WordPress Video Lightbox plugin allows you to embed videos on a page using lightbox overlay display similar to the one shown below. This plugin can be used to display images, flash, YouTube, Vimeo, iFrame etc in a lightbox overlay. The embedded videos can be viewed on iPad too.
Click on the image below to see how the video pops over in a lightbox overlay.
Previously I was using another plugin to display my Vimeo videos in a lightbox overlay but recently Vimeo changed their video embed code to use HTML5 in an effort to make the videos playable in iPhone and iPad. Unfortunately, the other plugin wasn’t working with this change and I was getting the following error on all my embedded Vimeo videos:
Sorry, this video does not exist
To get around the problem I created this plugin and tweaked the required JQuery library so it works with the new Vimeo video embed code. When you use this plugin to embed videos it will play your YouTube or Vimeo videos on iPhone and iPad too!
Download WP Video Lightbox
Download the WP Video Lightbox Plugin from here.
Works with the latest version of WordPress.
Requires WordPress 3.5 or higher.
- Unzip and Upload the folder ‘wp-video-lightbox’ to the ‘/wp-content/plugins/’ directory.
- Activate the plugin through the ‘Plugins’ menu in WordPress.
- Follow the instructions in the “Usage” section to start embedding your images, videos etc.
Our documentation for this plugin shows the various ways to use this plugin.
- Check the WP Video Lightbox Plugin Documentation.
If you are looking for a professionally supported, feature rich and robust video lightbox plugin then checkout our WordPress Lightbox Ultimate Plugin.
How to Turn Off the Related Videos At the End of a YouTube Video
If you do not want to show the “suggested videos” that YouTube shows at the end of a video playback then use the following technique:
Add &rel=0 at the end of the video ID which will turn off the related videos display.
Here is an example shortcode that shows you how to use this:
[video_lightbox_youtube video_id="G7z74BvLWUg&rel=0" width="640" height="480" anchor="click me"]
Alternatively, you can use “rel=false” at the end of the video URL to turn off the the related videos. Here is an example:
[video_lightbox_youtube video_id="G7z74BvLWUg&rel=false" width="640" height="480" anchor="click me"]
Automatically Use Video Thumbnail as Anchor
You can use an extra parameter in the shortcode to automatically generate and use the thumbnail of the YouTube or Vimeo video as the anchor image.
Here is an example usage of the shortcode with auto thumbnail option:
[video_lightbox_youtube video_id="G7z74BvLWUg" width="640" height="480" auto_thumb="1"]
Or the following for Vimeo video:
[video_lightbox_vimeo5 video_id=29417470 width=800 height=450 auto_thumb="1"]
The above shortcode will produce the following anchor image for the embedded video (it takes the thumbnail of the video automatically):
Using an Image as the Anchor of a Video
You can use an image as the anchor of the video (that will trigger the lightbox effect). Enter the image URL in the “anchor” parameter of the shortcode.
Here is an example usage of the shortcode:
[video_lightbox_youtube video_id="G7z74BvLWUg" width="640" height="480" anchor="http://www.yourdomain.com/wp-content/uploads/anchor-image.jpg"]
Make sure to enter a valid image URL for the anchor. You should first enter the anchor image URL in the browser’s address bar to verify that the image loads (that way you know if the image URL is valid or not).
Specifying alt Attribute for Thumbnail Image
You can use the “alt” parameter in the shortcode to specify an alternate text for your thumbnail image. Search Engines read this text description to understand what this image is about.
Here is an example usage of the shortcode with the “alt” parameter:
[video_lightbox_youtube video_id="G7z74BvLWUg" width="640" height="480" anchor="http://www.example.com/images/youtube-thumb.jpg" alt="text that describes this image"]
Specifying a Description for the Video
You can use the “description” parameter in the shortcode to specify a description for the video. The description text will show up below the video in the lightbox window.
Here is an example usage of the shortcode with the “description” parameter:
[video_lightbox_youtube video_id="G7z74BvLWUg" width="640" height="480" description="Test description text for the video"]
How to Enable Privacy-enhanced Mode in a YouTube Video
If you want to enable “privacy-enhanced mode” in a YouTube video, add &nocookie=1 at the end of the video ID.
Below is an example shortcode that shows you how to use this:
[video_lightbox_youtube video_id="G7z74BvLWUg&nocookie=1" width="640" height="480" anchor="click me"]
Check out my projects page for more cool WordPress plugins.
Comments (214 responses)
@Bassie, Unfortunately, this is not possible at the moment.
Hi, I would like to purchase your plugin – which looks fantastic. I just have one important question. Please let me know if it is possible to do the following with your plugin:
I have 5 videos, each one needs to be set to start at a certain time and on a certain day – without anyone having to activate anything. (it is for a hotel hallway, they would like certain videos to go on on their own). Thank you for your reply.
@Carrey, Unfortunately that is currently not possible with our plugin.
Is it possible to bring up a lightbox where the user can scroll through 4-10 different images and Vimeo videos?
@Blake, Unfortunately that’s not possible at the moment. If it’s a YouTube video you can actually upload the transcript to YouTube.
Hi there, I LOVE the lightbox plugin. I’m wondering if there’s a way to display the Transcripts I’ve made for each video inside the popup, so a user can read along while watching the video.
@Timo, In our lightbox ultimate prettyPhoto shortcode, you can add a start parameter (e.g. start=30) in the YouTube video URL to start the video from the given number of seconds
Hi there, I am using the wp-video lightbox plugin and I wonder whether it is possible to embed a youtube-video that starts 30 seconds into the video. Usually one can just add “?t=30” to the unique ID. This will not work with the plug-in, correct? Best regards and thanks for the great work.
@Arielle, Unfortunately, it’s not possible to link an HTML button a video popup at the moment. However, you can use an image that looks like a button.
Can you link a button to the video pop-up?
@Peter, Our Lightbox Ultimate plugin supports this option along with some other advanced YouTube parameters. For more information please check our YouTube documentation page here.
how do I remove the video title from showing when using Youtube?
@David, This feature is available in our Lightbox Ultimate plugin.
Great plugin. I would like to use the modestbranding to remove the YouTube player branding. When I add it to the url in the shortcode, it won’t work.
Here is the code for no related videos and no YouTube branding when embedding video.