-
AuthorPosts
-
August 24, 2019 at 12:41 pm #1130585
Hello,
How can I remove/hide the ALT text on all pictures on the website?
Thnx
August 25, 2019 at 5:38 am #1130696Hey Paul,
You can remove that from each image under Media in the WordPress menu.
Best regards,
RikardAugust 25, 2019 at 10:56 pm #1130780may i ask you why this is needed? Because a lot of users like to have alt ( and from the former view of html validity it is mandatory to have on imgs the alt tags) on every image. From SEO point of view it might be usefull to have these alt tags. etc.pp
you can insert this to your child-theme functions.php:
function remove_alt_attr(){ ?> <script> (function($){ $(window).load(function(){ $('#wrap_all img').removeAttr('alt'); }); })(jQuery); </script> <?php } add_action('wp_footer', 'remove_alt_attr');August 26, 2019 at 9:14 am #1130881Maybe I misinterpreted it! the ALT text can remain in the image but I don’t want to see a tooltip at mouse over …. excuse
August 26, 2019 at 10:32 am #1130894Tooltips comes from title tag – here too : for SEO point of view these title tags are usefull.
Because of tooltip is a browser thing – you can not supress showing tooltips accept get rid of title tag.
Removed from all anchors and imgs
Similar to above :function remove_title_attr(){ ?> <script> (function($){ $(window).load(function(){ $('#wrap_all a').removeAttr('title'); $('#wrap_all img').removeAttr('title'); }); })(jQuery); </script> <?php } add_action('wp_footer', 'remove_title_attr');August 26, 2019 at 11:41 am #1130916September 8, 2019 at 8:28 pm #1135717Hi @guenni007 and @rikard,
My sincere apology for the delay but I was abroad for a longer period. The second option works perfectly. I want to thank you both for the attention, the thinking and the solution!
September 8, 2019 at 11:56 pm #1135760 -
AuthorPosts
- The topic ‘Remove ALT text on whole website’ is closed to new replies.
