Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #900522

    Hi,

    I’ve followed everything in this post: https://kriesi.at/support/topic/remove-tooltip-display-of-image-captions/ . The final solution removes the caption everywhere — both when hovering and in the lightbox. What I’d like to do is simply remove the “tooltip” of the caption when you rollover the images at the bottom of this page: http://www.gospelshapedfamily.com/about/ but still have the caption and title show up in the lightbox area. I have a child theme set up for the functions.php file and have deleted the code so you can see how the description with html shows up currently on the site.

    Thanks for your help!

    #900587

    Hey imagestudios,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look? Thank you for the FTP, but we need to see the page setup first.

    Best regards,
    Victoria

    #900611

    Sure — in private content below.

    #902470

    Hi,

    Thank you for the info.

    We added the following script in the functions.php file to remove the title attribute of the masonry items.

    add_action('wp_footer', 'ava_custom_script');
    function ava_custom_script(){
    ?>
    <script type="text/javascript">
    (function($) {
    	function a() {
            $('.av-masonry-entry').each(function(){
              $(this).removeAttr('title');
            });
        }
    	
    	$(window).on('load', function() {
    		a();
    	});
    })(jQuery);
    </script>
    <?php
    }

    The “tooltip” is a default browser feature. You need to remove the title attribute if you don’t want the tooltip to display.

    Best regards,
    Ismael

    #902931

    Wow — thank you so much for your help on this. In testing the masonry gallery though, I’ve noticed that I lost the captions/descriptions now that previously showed up in the lightbox. Can that be restored?

    #903348

    Hi,

    The caption/description is derived from the title attribute and since we removed that attribute, the lightbox won’t be able to render the caption properly. Unfortunately, we can’t remove the “tooltip” without removing the title attribute.

    Best regards,
    Ismael

    #1106003

    Is there a way to have the lightbox captions pull from the alt tag instead of the title tag? That way we could prevent the tooltips from showing by just leaving the title fields blank, right? Thanks!

    #1106319

    Hi sky19er,

    Unfortunately, it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However, if it’s really important for you to get this done, you can always hire a freelancer to do the job for you :)

    Best regards,
    Victoria

    #1106416

    Hmm, I’m surprised, but ok, thanks anyway.

    #1106524

    Hi,

    Alright. We’ll close this thread now. Please feel free to open a new thread if you need anything else.

    Have a nice day.

    Best regards,
    Ismael

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘How to Remove Caption or Description HTML from Image Hover in Masonry Gallery’ is closed to new replies.