-
AuthorPosts
-
February 21, 2024 at 4:58 pm #1435041
Hello, I want to have a carousel of images with title. I have done it with Horizontal Gallery and looks great, but I should show the name/title of the image in the carousel, is that possible?
I am including images of countries, and now you have to click in the image to see where it is, but that is not practical….
Looking for your comments, thank you
February 22, 2024 at 6:28 am #1435083Hey carmen,
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, look for this code around line 786:
$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;
Replace it with:
$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 ); $image_caption = wp_get_attachment_caption( $attachment->ID ); $output .= '<div class="image-container">'; $output .= $img_tag; $output .= '<div class="image-caption">'; $output .= '<h4>' . get_the_title( $attachment->ID ) . '</h4>'; // Include title $output .= '<p>' . $image_caption . '</p>'; // Include caption $output .= '</div>'; $output .= '</div>';
Best regards,
IsmaelFebruary 26, 2024 at 9:59 am #1435407Hello I have included that code, but it is nor working…..any other suggestion?
February 28, 2024 at 10:36 am #1435708Hi,
Thank you for the update.
The modification is working correctly on our end. Where are you testing this? Please provide the site URL in the private field and include the WP and S/FTP login details. We would like to check it.
Best regards,
IsmaelFebruary 29, 2024 at 6:37 pm #1435914Hello this is the page where I am doing test: https://gonowjets.com/destinos/
I would love to have the possibility to have the carousel with the first images (the text in de middle of the image…)
Looking for your comments, thank you
March 1, 2024 at 8:32 am #1435947Hi,
Thank you for the update.
We were able to access the dashboard, but we were not able to adjust the settings or edit files because the account doesn’t have admin rights. Please assign the user role to admin or provide another account with administrator privileges. Also, please make sure that the Appearance > Theme File Editor panel is accessible.
Best regards,
IsmaelMarch 1, 2024 at 8:56 am #1435955Hello you have admin rights now!
March 2, 2024 at 8:50 pm #1436072March 4, 2024 at 7:34 am #1436201Hello I have already done it, but is still the same…
March 6, 2024 at 7:17 am #1436442Hello, any solution for this?
March 6, 2024 at 10:01 am #1436473Hi,
Apologies for the delay. We have added captions to the Horizontal Gallery images, and they are properly included in the gallery but render below the gallery images, so they are not visible. We tried to adjust the style of the captions, but encountered an error when we tried to add this code in the theme options.
.av-horizontal-gallery-wrap .image-caption { position: absolute; bottom: 0; background: rgba(255,255,255,0.5); width: 100%; padding: 10px 20px; color: #000000; }
Please try to deactivate the plugins temporarily, then add the code above in the Quick CSS field.
Best regards,
IsmaelMarch 6, 2024 at 3:13 pm #1436505OK is not working either, but I have used another option with code…thank you anyway with this in case you are interested: https://www.pluginsweb.es/slider-automatico-imagenes-titulo-boton-wordpress-sin-plugins/
March 9, 2024 at 12:25 pm #1436802Hi,
Glad to hear that you have this sorted out, and thanks for sharing your solution, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
- The topic ‘Carrusel images with title’ is closed to new replies.