How to Open a Secure YouTube Video in Lightbox

Last updated on by admin

It’s important to be able to embed a secure video when you are running a website in https. Unfortunately, most lightbox plugins are not compatible with https. This leads to various security warnings/mixed content errors in the browser and some modern browsers even block the content. In this article I will show you how you can pop up a YouTube video in lightbox and make it compatible with https.

Secure YouTube Video Setup

1. Install and activate the Lightbox Ultimate plugin.

Lightbox Ultimate is a a very popular lightbox plugin for opening content in lightbox. It allows you to create a text/image link to open a YouTube video in lightbox. You can even choose to create automatic thumbnail with a play button instead of creating a custom thumbnail image.

2. All you need to do is insert a shortcode into the post/page editor and the plugin will automatically create a link which will open in lightbox.

Here are the shortcodes for it:

Text Link

[wp_lightbox_prettyPhoto_anchor_text_video link="" width="480" height="360" text="Click here to open the Youtube video" description="Video description goes here"]

Video with Automatic Thumbnail

[wp_lightbox_prettyPhoto_video link="" width="480" height="360" description="Video description goes here" title="Video title goes here" auto_thumb="1"]

When you use the automatic thumbnail option you don’t have to specify a custom thumbnail image.

Video with Custom Thumbnail

[wp_lightbox_prettyPhoto_video link="" width="480" height="360" description="Video description goes here" source="" title="Video title goes here"]

Secure YouTube Video Demo

When you view the page it should look similar to this,

screenshot showing how to embed a YouTube video thumbnail for lightbox

When you are viewing from a mobile device it will look great as well.

screenshot showing how a YouTube video thumbnail looks in a mobile device

Clicking on a link will open the secure YouTube video in lightbox. This is a screenshot from a mobile device as you can see the popup window is responsive.

screenshot of secure YouTube video popup in lightbox from a mobile device

If you like the demo feel free to check out the Lightbox plugin homepage.

GET 60% OFF WordPress Hosting Here

Leave a Reply

Your email address will not be published. Required fields are marked *