Hi Rolf,
Try adding this at the very end of your theme / child theme functions.php file:
function add_custom_script(){
if(is_singular('post')){
?>
<script>
(function($){
$(window).load(function() {
var postImage = $('.single-big .wp-post-image');
var imgAlt = postImage.attr('alt');
postImage.after("<div class='img_caption'>"+imgAlt+"</div>");
});
})(jQuery);
</script>
<?php
}
}
add_action('wp_footer', 'add_custom_script');
Regards,
Josue
Thanks, that works. Couldn’t you build that in as an option to enfold, so people don’t have to mess with their functions.php?
Hey Rolf!
Feel free to request it here. Also, if you use a child theme you can store functions like this in the child theme functions.php.
Best regards,
Josue