Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ekka21/3044888 to your computer and use it in GitHub Desktop.
Save ekka21/3044888 to your computer and use it in GitHub Desktop.
Wordpress: Add nofollow to the comment reply links
/**
* Add a rel="nofollow" to the comment reply links
*/
function comment_reply_link_nofollow( $link ) {
global $user_ID;
return str_replace( '")\'>', '")\' rel=\'nofollow\'>', $link );
}
add_filter( 'comment_reply_link', 'comment_reply_link_nofollow' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment