Hello,
How can I remove/hide the ALT text on all pictures on the website?
Thnx
Hey Paul,
You can remove that from each image under Media in the WordPress menu.
Best regards,
Rikard
may 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');
Maybe I misinterpreted it! the ALT text can remain in the image but I don’t want to see a tooltip at mouse over …. excuse
Tooltips 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');
Hi @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!