i do not want to have a caption under the image itself – only as a caption to the lightboxed image so i found
this here from Josue:
https://kriesi.at/support/topic/show-captions-in-a-wordpress-gallery/#post-331052
and i changed it to:
function gallery_title_fix(){
?>
<script>
(function($){
$(window).load(function() {
$('.lightbox-added img').each(function(){
var lin = $(this).attr('alt');
$(this).attr('title',lin);
});
});
})(jQuery);
</script>
<?php
}
add_action('wp_footer', 'gallery_title_fix');
is it possible to take not the attachement alt text but f.e. the attachment_caption or the attachment_content
Hey Guenter!
Go ahead and send us a link to your page so we can get a better idea of what’s going on.
Cheers!
Elliott
Hey!
Open up /enfold/config-templatebuilder/avia-shortcodes/image.php and on line 228 you should see this.
$alt = !empty($alt) ? esc_attr($alt) : '';
Add this above it.
$alt = $attachment_entry->post_content;
Cheers!
Elliott
thanks – it works.
BTW is there a possibility to change it not in the parent theme folder. e.g in a subfolder of the child-theme ?
Hi!
Please see – http://kriesi.at/documentation/enfold/add-new-or-replace-advanced-layout-builder-elements-from-child-theme/
Best regards,
Yigit
works this way Yigit – can be closed now! – thanks