Multiple Popups on a single Post/Page
Add multiple responsive YouTube & Vimeo Video Popups to a single post/page with WP Video Popup PRO. To do that, we give each shortcode a unique ID that, at the same time, works as the CSS class to trigger/open the lightbox.
In the example below we add 2 Popups to a single page. The first video is a YouTube video while the second one is hosted on Vimeo. Here’s what the code would look like:
[wp-video-popup id="video1" video="https://www.youtube.com/watch?v=YlUKcNNmywk"]
<a class="video1" href="#">Play Video 1</a>
[wp-video-popup id="video2" video="https://vimeo.com/136696258"]
<a class="video2" href="#">Play Video 2</a>
If you’re not going to have multiple popups on a single page with the PRO version, the regular shortcode needs to be used. See Basic Usage
Autoplay on Page Load
You may want to show a video to your visitors right after page load. To do that, add the
autoplay parameter to your shortcode like this:
[wp-video-popup autoplay="1" mute="1" video="https://www.youtube.com/watch?v=YlUKcNNmywk"]
Due to recent changes in the autoplay policy, some browsers require the video to be muted to play automatically. To mute the video, add the mute attribute to the shortcode as shown in the example above.
Please note that this method may not match the GDPR guidelines.
To change the size of your video & overlay background color, navigate to Settings -> WP Video Popup in your WordPress admin.
The Popup size field is not restricted to px, you can enter a value like 80% as well.