Tagged: Lightbox
Hello,
I have a page with 2 different image blocks.
The first one is the main product image, and I assigned a specific class. It’s a dynamic image that changes with the product variation.
The second block is a regular gallery of 4 images.
I would like to remove the lightbox I have on the dynamic image, and mantain it on the regular gallery.
Is it possible?
Thank you
Hi,
Thanks for contacting us!
Please edit your Column element and give it a custom CSS class (“my-custom-class” in example below) and then add following code to bottom of functions.php file of your child theme – https://kriesi.at/documentation/enfold/child-theme/
function av_remove_lightbox_class() {
?>
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('.my-custom-class').addClass('noLightbox');
});
</script>
<?php
}
add_action('wp_footer', 'av_remove_lightbox_class');
Regards,
Yigit