Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1337940

    Hi folks. Would it be possible to tweak the Horizontal Gallery so that the image description (or title) is shown below the image also when the image is active/enlarged (and not only when you open it in the Lightbox)?

    That would be really great…

    Thanks in advance!
    Bye,
    A.-

    #1337985

    Hey Angelo,

    Thank you for the inquiry.

    You can use the following script in the functions.php file to insert the title below the horizontal gallery images. You may need to modify the style or css of the av-horizontal-gallery-img-title a bit.

    function ava_custom_script() { ?>
        <script>
            (function($) {
               $(".av-horizontal-gallery-img").each(function() {
                    var title = $(this).attr("title");
                    $("<span class='av-horizontal-gallery-img-title'>" + title + "</span>").insertAfter(this);
               });
            })(jQuery);
    	</script>
        <?php
    }
    add_action('wp_footer', 'ava_custom_script');
    

    Best regards,
    Ismael

    #1338038

    Thanks @Ismael, it works great!!
    Solved, as usual.
    Bye!
    A.-

    #1338111

    Hi,

    Glad to know that the script works. Please feel free to open another thread if you need anything else.

    Have a nice day.

    Best regards,
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Show image description in Horizontal Gallery also when the image is enlarged’ is closed to new replies.