Skip to content

Instantly share code, notes, and snippets.

@brendonexus
Created March 5, 2020 16:13
Show Gist options
  • Save brendonexus/c3816e8cd728c700d1313c9a91e6f3db to your computer and use it in GitHub Desktop.
Save brendonexus/c3816e8cd728c700d1313c9a91e6f3db to your computer and use it in GitHub Desktop.
Remove rel="nofollow" from Woocommerce
add_filter( 'woocommerce_loop_add_to_cart_args', 'remove_rel', 10, 2 );
function remove_rel( $args, $product ) {
unset( $args['attributes']['rel'] );
return $args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment