Tagged: caption, description, hover, html, Masonry Gallery, remove
-
AuthorPosts
-
January 22, 2018 at 2:09 am #900522January 22, 2018 at 5:20 am #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,
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.