| 开发者 | davidvongries |
|---|---|
| 更新时间 | 2026年11月9日 01:10 |
| PHP版本: | 5.6 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
Add [wp-video-popup video="https://www.youtube.com/watch?v=YlUKcNNmywk" text="Watch video"] to your page. It outputs a button that opens the YouTube video in a lightbox. You can also build the shortcode under Settings → WP Video Popup.
Wrap the image in the shortcode: [wp-video-popup video="…"]<img src="thumbnail.jpg" alt="Watch video">[/wp-video-popup]. Alternatively, add the CSS class wp-video-popup to the image.
Yes. Add the shortcode with a Shortcode widget/module/block and add the CSS class wp-video-popup to the button or image that should open the popup. See Description for where to find the CSS class field in each builder.
YouTube (including youtube-nocookie.com and youtu.be links), Vimeo (including private videos) and Rumble. Self-hosted videos are available in WP Video Popup PRO.
The free version supports one video popup per page. WP Video Popup PRO supports unlimited popups per page.
Yes, with WP Video Popup PRO. It can open the popup and start the video as soon as the page loads. The free version opens the popup when a visitor clicks a button, link or image.
No. The video is only loaded once a visitor opens the popup, so it doesn't affect your page load speed.
No connection to the video provider is made until a visitor opens the popup. For YouTube, use a youtube-nocookie.com link for privacy-enhanced mode.
We add the autoplay parameter to the embed URL by default, so the video should start playing once the popup is opened. Some browsers only allow autoplay for muted videos.
To mute the video, add the mute="1" attribute to the shortcode like this:
[wp-video-popup mute="1" video="https://www.youtube.com/watch?v=YlUKcNNmywk"]
portrait="1" parameter to your shortcode.