Add class to fix Lightbox
-
Howdy, I first want to say Meow Gallery displays images beautifully with great options. ??
I’m struggling to get Meow Gallery thumbnails to work with any lightbox. I’m aware the images should link to image.jpg. The lightbox’s work perfectly with WP native media gallery and have even tried using specific CSS selectors to target page elements. I recall reading a thread here about Meow Gallery initiating before those lightbox’s which can prevent images from opening in lightbox. Looking at the DOM anchor links that wrap the images I can see they have a blank class (class=””) instead of showing class=”fancybox image”.Looking through the tutorial I can see there are cool functions for modifying captions such as:
add_filter( 'mgl_caption', 'my_mgl_caption', 25, 4 );
- https://meowapps.com/meow-gallery/tutorial/#modify-captions
Is there a filter or way to add a class around the anchor surrounding the image thumbnails? Or a jQuery/JS script that can append a class for this. I believe this would initiate the lightbox as the lightbox in question is very flexible and will work with native gallery, media, and external images/HTML as long as it’s anchor is wrapped with the fancybox class.
I only have 1 lightbox active at a time but tried a few reputable ones in case one worked better.
Warm regards,
Josh
- https://meowapps.com/meow-gallery/tutorial/#modify-captions
- You must be logged in to reply to this topic.