
Tagged: caption, description, hover, html, Masonry Gallery, remove
-
AuthorPosts
-
January 22, 2018 at 2:09 am #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!
January 22, 2018 at 5:20 am #900587Hey 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,
VictoriaJanuary 22, 2018 at 6:09 am #900611Sure — in private content below.
January 25, 2018 at 3:34 am #902470Hi,
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,
IsmaelJanuary 25, 2018 at 6:04 pm #902931Wow — 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?
January 26, 2018 at 12:45 pm #903348Hi,
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,
IsmaelJune 1, 2019 at 8:16 am #1106003Is 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!
June 2, 2019 at 10:56 am #1106319Hi 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,
VictoriaJune 2, 2019 at 6:56 pm #1106416Hmm, I’m surprised, but ok, thanks anyway.
June 3, 2019 at 3:07 am #1106524 -
AuthorPosts
- The topic ‘How to Remove Caption or Description HTML from Image Hover in Masonry Gallery’ is closed to new replies.