Site logo

Archived topic

Load video only on click like that on generatepress.com

8 replies · Started by Leon on September 30, 2018

Viewing posts 1–9 of 9

Hi Tom,

I'm wondering if it's possible for you to share how you make the videos load on click only.

I guess you just put an image with a play icon.

But how do you make this happen: after clicking the image, the video will play in a popup window?

Thank you in advance.
Leon

Thank you Tom. Made it with featherlight.

Cheers~

You're welcome :)

Hi Tom, I have managed to run Lity on my website. I would like to ask you for help with following issue. Lity needs 'data-lity' attribute inside the <a> tag. It is not a problem to insert it manually while creating a link, but I would like to use Lity for images inserted in the post through the 'insert media' dialog box. I have been trying hard to setup some filter or hook to automatically add 'data-lity' inside the image link tag (both for new and already uploaded images). Could you point me to the right direction please? I think the solution might by somewhere around wp core caption shortcode...

Tank you, Tom. The filter image_send_to_editor works, but only for media uploaded in the wordpress media library. It seems that wordpress uses another function to create image links for media added from external URLs. Any ideas?

Edit: Figured out how to get Lity working no reply needed.

This archived topic is closed to new replies.