- This topic has 8 replies, 4 voices, and was last updated 1 year, 5 months ago by
Nick.
-
AuthorPosts
-
September 30, 2018 at 5:35 am #689888
Leon
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.
LeonSeptember 30, 2018 at 10:12 am #690093Tom
Lead DeveloperLead DeveloperWe used this jQuery library: https://github.com/jsor/lity
If you’re not comfortable setting up a library like that, a plugin like this might help: https://wordpress.org/plugins/wp-featherlight/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentSeptember 30, 2018 at 11:15 am #690112Leon
Thank you Tom. Made it with featherlight.
Cheers~
September 30, 2018 at 10:09 pm #690321Tom
Lead DeveloperLead DeveloperYou’re welcome 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentAugust 17, 2019 at 2:36 am #986345Roman
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…August 17, 2019 at 10:06 am #986659Tom
Lead DeveloperLead DeveloperI wonder if something like this will work?: https://wordpress.stackexchange.com/a/222442
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentAugust 18, 2019 at 12:06 am #986972Roman
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?
August 18, 2019 at 10:06 am #987378Tom
Lead DeveloperLead DeveloperStrange, I would think that filter would work regardless of where the image is coming from, as they all get added to the editor.
Other than that, you might need to find some code that filters
the_content
, but that might be somewhat buggy.Maybe this?: https://gist.github.com/ControlledChaos/0f91329cafff8d778cd0b176a7a6abbb
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 21, 2019 at 11:26 am #1040602Nick
Edit: Figured out how to get Lity working no reply needed.
-
AuthorPosts
- You must be logged in to reply to this topic.