Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1200334

    Hello

    Recently i added this function to my child theme’s functions.php file. to add nofollow noopener noreferrer on cart button link

    Is it correct to put all three on the same line? (‘nofollow noopener noreferrer’)

    It is right like this?

    /*  Add nofollow to cart button*/
    add_action('wp_footer', 'ava_add_rel_nofollow');
    function ava_add_rel_nofollow(){
    	?>
    	<script type="text/javascript">
    		(function($) {
    			$('.single_add_to_cart_button').attr('rel', 'nofollow noopener noreferrer');
    		})(jQuery);
    	</script>
    	<?php
    }

    Thanks

    • This topic was modified 4 years, 7 months ago by Astrobiologic.
    #1203125

    Hey Ganubis,

    Yes, it is correct.

    You can see it here:

    If you need further assistance please let us know.
    Best regards,
    Victoria

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.