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
Hey Ganubis,
Yes, it is correct.
You can see it here:
If you need further assistance please let us know.
Best regards,
Victoria