Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1130585

    Hello,

    How can I remove/hide the ALT text on all pictures on the website?

    Thnx

    #1130696

    Hey Paul,

    You can remove that from each image under Media in the WordPress menu.

    Best regards,
    Rikard

    #1130780

    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');
    #1130881

    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

    #1130894

    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');
    #1130916

    Hi,

    Thanks for helping out @guenni007, did you try that out @paul?

    Best regards,
    Rikard

    #1135717

    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!

    #1135760

    Hi,
    Glad Guenni007 was able to assist, and thanks for using Enfold.

    Best regards,
    Mike

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Remove ALT text on whole website’ is closed to new replies.