Tagged: 

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

    Hi,

    I have a gallery setup and I’d like to display the title of the image below the image in the gallery. I try to use the style options but it doesn’t show. How can I fix this? I put a link to the page in the private content.

    #1446906

    Hey MikeTandySwag,

    Thank you for the inquiry.

    There is no option for this by default, but you can add captions to the images, and it will display as a tooltip. Alternatively, you can use this script in the functions.php file:

    function ava_custom_script_gallery_title()
    {
        ?>
        <script>
            (function ($)
            {
                function g()
                {
                    $('.avia-gallery-thumb img[data-avia-tooltip]').each(function () {
                        var tooltipText = $(this).attr('data-avia-tooltip');
                        var paragraph = $('<p></p>').text(tooltipText);
                        $(this).after(paragraph);
                    });
                }
    
                $(document).ready(function ()
                {
                    g();
                });
            })(jQuery);
        </script>
        <?php
    }
    add_action('wp_footer', 'ava_custom_script_gallery_title');
    

    Best regards,
    Ismael

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.