Archived topic
YouTube Video on click in Lightbox
3 replies · Started by webcréateur on February 8, 2019
Hi.
We want to use YouTube videos on our homepage.
I fount a Thread where Tom said they use Lity on the frontage of https://generatepress.com/
https://github.com/jsor/lity
I tried to use the mentioned plugin. With pictures, it works but unfortunately it does not work with videos from Vimeo or YouTube.
Can you please tell me how you did embed Lity in your WordPress? With a Hook in GP Elements wp_head?
<link href="https://mydomain/wp-content/dist/lity.css" rel="stylesheet">
<script src="https://mydomain/wp-content//wp-content/vendor/jquery.js"></script>
<script src="https://mydomain/wp-content/wp-content/dist/lity.js"></script>
Thank you.
Best regards.
btw. The following Plugin does not work with video: WP Video Lightbox
Hi there,
Have you tried WP Featherlight?
This is what Tom suggested if you aren't comfortable with setting it up:
https://generatepress.com/forums/topic/load-video-only-on-click-like-that-on-generatepress-com/#post-690093
Hi Leo,
thanks for answering.
Yes, I tested WP Featherlight without success, too. :(
Do you have any advice or guidance on how to include lity?
Thank you.
Best regards.
Hi there,
Once Lity is installed, you just need to add the data-lity attribute to your link: https://www.screencast.com/t/BOoQ3ck4IO