How to Remove Title Tooltips from WordPress with jQuery on Hover – Fast and Easy Tutorial

0
562

Hi Mike here, in this tutorial I’m going to show you how you can use jQuery to remove WordPress title tooltip attributes on hover, which allows screen readers and SEO to use the titles while your site retains a clean modern look. Remove title tooltip attributes from images, links, buttons, icons and more.
This is the code used in the video:

function custom_remove_title_script() { 
?>
    <script>
(function($){
    $("*").hover(function(){
      $(this).removeAttr("title");
    });  
  })(jQuery);
  </script>
    <?php
}
add_action('wp_footer', 'custom_remove_title_script');

This snippet would be used in your WordPress > Appearance > Theme Editor > functions.php, and using a child theme would be the best practice so that when you update your theme the function will not be lost.
If you found this helpful please leave a comment and subscribe to my channel.
So until next time, take care.

LEAVE A REPLY

Please enter your comment!
Please enter your name here