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

    Hello

    I am using a content slider in my website and the slides only contain images. When you click that image a lightbox pops up. Perfect!
    But is it possible to show the title of the image under the image in the lightbox?

    Here you can check/test how it looks now: http://casepacker.be/?page_id=142

    #363934

    Hey jurgen1979!

    Try adding this to the bottom of your /enfold/functions.php file.

    add_action( 'wp_footer', 'enfold_customization_content_titles' );
    function enfold_customization_content_titles(){
    ?>
    <script type = "text/javascript">
    jQuery(document).ready(function(){
    	alert("test");
    	jQuery(".wp-caption a").each(function(){
    		jQuery(this).attr("title", jQuery(this).find("img").attr("alt"));
    	});
    });
    </script>
    <?php
    }

    And then make sure to set an alt text for your images when inserting them into the slide.

    Cheers!
    Elliott

    • This reply was modified 10 years ago by Elliott.
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.