Viewing 1 post (of 1 total)
  • Author
    Posts
  • #1490521

    Hi, I’ve tried multiple codes to remove the image title on mouse hover, but it’s not disappearing.

    It doesn’t show up if I’m logged into wp-admin, but once I logout I still see it.

    Using Chrome on Mac

    Codes I’ve tried

    Quick CSS

    /*Remove image title on hover*/
    img[title] {
            pointer-events: none;
        }

    Functions.php

    /*Remove image alt text on hover*/
    function remove_title_attr(){
    ?>
     <script>
    jQuery(window).on('load', function(){
    jQuery('#wrap_all a').removeAttr('title');
    jQuery('#wrap_all img').removeAttr('title');
    });
     </script>
    <?php
    }
    add_action('wp_footer', 'remove_title_attr');
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.