Hello, I found a couple of threads about it, but I still can’t find a way to show the captions underneath the images in the horizontal gallery carousel. Is there a way to do this? Thanks
Hey marxsvjetlana64,
Thank you for the inquiry.
This is possible but you have to modify the enfold\config-templatebuilder\avia-shortcodes\gallery_horizontal\gallery_horizontal.php file, around line 761, look for this code.
$img_tag = "<img class='av-horizontal-gallery-img' width='{$img[1]}' height='{$img[2]}' src='{$img[0]}' title='{$title}' alt='{$alt}' />";
$img_tag = Av_Responsive_Images()->prepare_single_image( $img_tag, $attachment->ID, $lazy_loading );
$output .= $img_tag;
Below, add this.
$output .= $img_tag;
$caption = wp_get_attachment_caption($attachment->ID);
$output .= "
<div class='av-image-caption'>";
$output .= $caption;
$output .= '</div>
';
Then add this css code to adjust the position of the caption container.
.av-horizontal-gallery-wrap .av-image-caption {
position: absolute;
bottom: 50px;
z-index: 100;
left: 0;
width: 100%;
padding: 50px;
}
Best regards,
Ismael