Remove Nofollow From Commenter Name
There are those of you out there that may in fact want to give back to your commenters by removing the nofollow tag from the commenter’s name area on your blog. While there are plugins that allow you to do this I figured for those of you interested that I would show you how to do it manually.
Before we go digging into and editing the core WordPress files I highly suggest that you BACKUP any file that you intend to edit and change. Don’t hold me responsible for something that you mess up and can’t fix even though I warned you beforehand.
With that said, make your way over to your WordPress installation through FTP or however else you do it. There is only one file and one line to edit to remove the nofollow tag from the commenter’s name so this will go very quick and will be quite easy.
You should be at the default folder for your WordPress installation. The directory that contains the wp-admin, wp-content, wp-includes folders along with the other files. We are going to want to navigate into the wp-includes folder. Inside of the wp-includes folder there will be a .php file named comment-template.php. This is the file we are going to be editing, remember……BACKUP!
Open the file in your text editor and find line number 116. If you don’t have a text editor that shows the line numbers you can use the search feature usually located in one of the menus on the menu bar. If you have to use the search feature you need to make a search for rel=’external nofollow’. For clarification purposes, the surrounding code should look like
if ( empty( $url ) || ‘http://’ == $url )
$return = $author;
else
$return = “<a href=’$url’ rel=’external nofollow’>$author</a>”; <– This line
return apply_filters(‘get_comment_author_link’, $return);
Ok, now that you have found the correct line, highlight the rel=’external nofollow’ text and delete it. Save the file and upload it back to your server if needed and you are done! Now when your commenters leave a comment, you can give them some link love by showing Google that you trust their sites. Of course, this method is only advised if you have control over your commenters.
Twitter
FaceBook
RSS