Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1394960

    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

    #1395025

    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

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.