- This topic has 22 replies, 4 voices, and was last updated 3 years, 6 months ago by
Josue.
-
AuthorPosts
-
June 7, 2022 at 5:10 am #2245934
SLIM
This is a follow-up of this topic:
https://generatepress.com/forums/topic/lightweight-modal-lightbox/I’m interested in enabling lightbox NATIVELY in the gutenberg image / gallery blocks. I found a plugin SimPLY gallery – but this plugin seems to add and come with a fair bit of bloat.
Do you guys currently have any plugins that would enable lightbox natively within the gutenberg blocks? If not – could i request this feature to be added to the GenerateBlocks plugin at least 🙂
According to this page:
https://wordpress.com/support/wordpress-editor/blocks/image-block/It should have it in there? ^^^ ( CTRL+F = “lightbox” ) and you’ll see what i mean
CheersJune 7, 2022 at 6:28 am #2246011David
StaffCustomer SupportHi there,
its not something we have in our offering yet.
We may consider it in a future release of GenerateBlocks as GB 1.5 will have an Image Block 🙂What you see there is from
wp . comwho has a slight variant on several of the core blocks including features that don’t ( currently ) exist in .orgSome suggestions made here for plugins:
https://generatepress.com/forums/topic/lightweight-modal-lightbox/#post-1020584
Scroll down for a user suggestion too.
June 7, 2022 at 4:08 pm #2246580SLIM
Ahh I see, yes the dotcom was like rented wordpress 🙂 i remember now.
Thank you David.June 8, 2022 at 3:58 am #2247018David
StaffCustomer SupportYou’re welcome
August 12, 2022 at 6:43 am #2310887Josue
Hi David,
The only plugin recommended in this topic: https://generatepress.com/forums/topic/lightweight-modal-lightbox/#post-1020584 – which doens’t use JQuery hasn’t been updated for over a year, hasn’t been tasted with the latest version of WP, and it has only like 10 active users. So, I’m wondering now that Generateblocks has an image block if you guys have a recommendation for a lightbox lightweight plugin/solution without JQuery?
Thank you in advance,
August 12, 2022 at 9:32 am #2311182David
StaffCustomer SupportHi there,
most lightbox plugins rely on jQuery.
There is the fslightbox.js script that does it without jQuery. And looks like someone made that into a pluginhttps://wordpress.org/plugins/simple-lightbox-fslight/
Its over Wp 5.9 and has at least been updated in the last 3 months
August 12, 2022 at 9:43 am #2311194Josue
Hi David,
Thank you for your answer. That plugin may be the best option available without jQuery. I’ve searched a lot for one, so I will try this one out.
Best,August 12, 2022 at 10:11 am #2311210Josue
Just so you guys know, I’ve tried that plugin on a staging website and couldn’t make it work. Perhaps anyone else has better luck…
August 13, 2022 at 8:16 am #2311884David
StaffCustomer SupportMight be worth asking in our Facebook group – to see what others are using.
August 13, 2022 at 10:16 am #2311980Josue
Good idea David, I’ll do it.
August 13, 2022 at 11:59 am #2312024Josue
David someone suggested in your Facebook page one that looks like a good option. Vanilla JS: https://wordpress.org/plugins/gallery-block-lightbox/#utm_medium=referral&utm_source=facebook.com&utm_content=social – I haven’t been able to make it work with the image block of Generateblocks.
I’ve managed to make it work with the image block of Gutenberg though, but I’m only using Generateblocks, to avoid the 86 KB of Gutenberg.
I guess there must be something that I am missing…
August 14, 2022 at 5:31 am #2312395David
StaffCustomer SupportIf you select your GB Image Block, and go to its Dynamic Data, and enable Dynamic Data and just set the:
Link source: Single ImageAugust 14, 2022 at 6:00 am #2312430Josue
Yes, I did that, but doesn’t work. I realized that it works with certain blocks only like you can see here: https://wordpress.org/plugins/gallery-block-lightbox/ and GB block image is not listed there.
However they said in the Facbook group that we can make that plugin work with GB block too, its just that we have to enqueue the js ourselfs for GB image blocks. We would do that with has_block condition. How can we do that?
August 14, 2022 at 6:02 am #2312431David
StaffCustomer SupportThey would need to provide the function for enqueueing their scripts.
If the could do that, then we could tweak it for GB image block.August 14, 2022 at 6:13 am #2312440Josue
They already give this information in their FAQ’s:
FAQ –> How to enqueue the necessary assets (script & style) for blocks outside of posts or for block types that are not supported by default?
If you want to use the Gallery & Image Block Lightbox plugin with a block type that is not supported by default, you can make use of the has_block() function. For instance, in the case of the Kadence Blocks Advanced Gallery, use:
add_filter( ‘baguettebox_enqueue_assets’, function ( $enqueue_assets ) {
return $enqueue_assets || has_block( ‘kadence/advancedgallery’ );
} );
Of course, in the previous example you also have to add the appropriate baguettebox selector, i.e.
add_filter( ‘baguettebox_selector’, function( $selector ) {
return $selector . ‘,.wp-block-kadence-advancedgallery’;
} ); -
AuthorPosts
- You must be logged in to reply to this topic.