Tagged: Tooltips Gallery Disable
-
AuthorPosts
-
November 7, 2025 at 5:46 pm #1491038
Hello, I need to disable tool tips on the gallery element across the entire site.
November 8, 2025 at 8:53 am #1491043Are you talking about the tooltips displayed by the browser itself when hovering over the image?
They appear automatically if the image has a title attribute.

However, if you have a gallery that displays images in a lightbox, this title attribute is also displayed as text in the bottom bar of the lightbox. Completely removing the title tag would therefore be suboptimal. For galleries, you can switch to displaying the description or caption instead, but this is not possible for all Enfold elements.
So if it only affects the galleries on your site, you could do that, but you would then have to update the description of the images, for example.There is a snippet that, when placed in the child theme’s functions.php, temporarily removes this title tag on hover but adds it back when clicked:
function temporary_removal_title_tags(){ ?> <script> window.onload = function() { var elementsWithTitle = document.querySelectorAll('a, img, *[title]'); for (var i = 0; i < elementsWithTitle.length; i++) { var element = elementsWithTitle[i]; element.setAttribute("data-original-title", element.title); element.addEventListener("mouseenter", function() { this.title = ""; }); element.addEventListener("mouseleave", function() { this.title = this.getAttribute("data-original-title"); }); element.addEventListener("mousedown", function() { this.title = this.getAttribute("data-original-title"); }); } }; </script> <?php } add_action('wp_footer', 'temporary_removal_title_tags');here you see that this script is working for all anchor elements or images – or all elements that have a title-tag
November 8, 2025 at 1:38 pm #1491056Hi,
Thanks for helping out @guenni007. Did that answer your question @Dunckley_Design?
Best regards,
RikardNovember 10, 2025 at 4:11 pm #1491121Hi @guenni007 and @rikard, thanks for helping out. I’ve attached a screenshot below. I’m trying to disable the tooltip that hovers over the image in the gallery, especially on mobile, but would be ok just disabling it altogether.
November 10, 2025 at 4:58 pm #1491124#top .avia-tooltip.avia-tt { display: none !important; }November 10, 2025 at 5:08 pm #1491125@guenni007 thank you!
November 10, 2025 at 5:51 pm #1491134Hi,
Thanks for the update, and thanks @guenni007 for helping out. We’ll close this thread for now then, please open a new thread if you should have any further questions or problems.
Best regards,
Rikard -
AuthorPosts
- The topic ‘Disable tooltip on gallery’ is closed to new replies.
