baguetteBox.js icon indicating copy to clipboard operation
baguetteBox.js copied to clipboard

problem to access images in wordpress

Open Flaschenzug opened this issue 1 year ago • 1 comments

I added baguetteBox to Wordpress and for galleries it works perfectly well. But for normal images it is not working.

Normal images are displayed like this: <figure class="wp-block-image"><a ...><img ...></a></figure>

Galleries like this: <figure class="wp-block-gallery"><figure class="wp-block-image"><a ...><img ...></a></figure></figure>

If I try to add both classes to the .run , I get an error. ... baguetteBox.run('.wp-block-gallery, .wp-block-image',{ ...

Any ideas how I can get to the point, where I can open single images AND galleries?

Thanks a lot! :-)

Flaschenzug avatar Jun 12 '23 21:06 Flaschenzug

There is a WordPress plugin that uses baguetteBox under the hood.

Maybe try your luck with it.

https://de.wordpress.org/plugins/gallery-block-lightbox/

https://github.com/goaround/gallery-block-lightbox

crafted-at avatar Feb 05 '24 09:02 crafted-at