Tagged: , ,

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

    Hello, i don´t know how to remove the image tooltips (title, alt,….) on hover. Even when i remove the title the picture, a tooltip is displayed.

    greetings

    #883927
    #883942

    Hi Yigit, it doesn´t work. Do i really need a child theme?

    #883946

    Ok , thanks, now it works. I forgot to delete the cache!

    #883952

    But another question… Does the image SEO still work?

    #883957

    Hi!

    Glad it is working fine!

    By adding the code, you are basically removing title tags from your images. You can read more about image alt and title tags here – https://yoast.com/image-seo-alt-tag-and-title-tag-optimization/

    Best regards,
    Yigit

    #883960

    Ok, is there no other (better) solution? Nearly every business website works without the tooltips.

    #885130

    Hi reniai,

    Here is a suggestion on how to hide the alt text
    https://stackoverflow.com/questions/36305805/how-to-hide-alt-text-using-css-when-the-image-is-not-present

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #1018588

    Hello

    I’ve been trying several of these methods to hide captions that show when you hover over a hotspot (image) and thumbnails in a gallery, and none are working properly for me so appreciate help.

    a) I want to keep tooltips that occur when i hover over a hotspot in an image which I use on several pages.

    b) In a gallery on many pages (not masonry etc.) when I add a caption, that is shown as a box when I hover over a gallery thumbnail and also shown when the thumbnail opens in the lightbox as an overlay on its bottom. I want to keep the caption in the lightbox and remove the caption shown when I hover over the thumbnail. You can see this in my link below.

    I tried the CSS below, but it removed all captions when I hovered and for a) and in b) above, including the lightbox.
    .avia-gallery-thumb:hover .avia-tooltip {
    opacity: 0;
    display: none !important;
    }

    Then I removed that CSS and tried the code below in functions.php of child theme but did the opposite – it kept the caption display when I hovered over the thumbnail in the gallery or over a hotspot, but removed captions from the lightbox.
    function remove_title_attr(){
    ?>
    <script>
    jQuery(window).load(function(){
    jQuery(‘#wrap_all img.avia_image, #wrap_all .avia-gallery-thumb img, #wrap_all .avia-gallery-thumb a’).removeAttr(‘title’);
    });
    </script>
    <?php
    }
    add_action(‘wp_footer’, ‘remove_title_attr’);

    Please advise.
    Thanks

    #1019327

    Hi,

    The tooltip and the lightbox caption requires the title attribute so removing that particular attribute will affect both. Try to create a script that removes the title attribute on “mouseover” and then brings it back on “mouseout”.

    Example here: https://stackoverflow.com/questions/8948113/mouseover-and-mouseout-events-jquery

    Best regards,
    Ismael

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