Hi,
i use enfold with the woocommerce plugin. In the enfold settings i chose “Default enfold product gallery” and i’m running the latest enfold version.
When i click on a product image, so that it show up in the lightbox, there’s the alt tag displayed in the bottom left corner. In one of the previous versions of enfold, it showed the caption field in the bottom left corner. How can i change the behaviour, so that there’s the caption content again?
There are a lot images, where we definitely need the caption to show up instead of the alt content.
Thanks in advance
Stefan
Hey YDC-Y,
Can you post a link to that page? so we can take a closer look.
Best regards,
Nikko
Hi,
in the meantime i found a solution, which works for the moment:
function avia_woocommerce_gallery_thumbnail_description($img, $attachment_id, $post_id, $image_class ) {
return $img;
}
function avia_woocommerce_post_thumbnail_description($img, $post_id){
return $img;
}
function gallery_title_fix(){
?>
<script>
(function($){
$(window).load(function() {
$('.woocommerce-product-gallery__wrapper img').each(function(){
var caption = $(this).attr('data-caption');
$(this).attr('title',caption);
});
});
})(jQuery);
</script>
<?php
}
add_action('wp_footer', 'gallery_title_fix');
Kind regards!
Hi YDC-Y,
Glad you got it working for you and thank you for sharing! :)
If you need further assistance please let us know.
Best regards,
Victoria