As a default wordpress will add the nofollow tag to your sites comment posters. This is done to supposedly prevent spam. However I simply do not agree. If your site members contribute with comments to your content why not reward them with a simple link back to their site? I see no problem in this. By using nofollow on your blogs you are not only discouraging spammers but you are also discouraging legit members from posting. Now you will want to be sure you have some comment spam protection (Akismet works great) before you open up the follow urls. This will catch any naughty spammers, but also allow legit comments through.
WARNING: Always Always and yes Always back up your files before you go messing with them in case you make a booboo!
Removing WordPress rel=nofollow on Authors
For the author link, the line of code is line 48 on wp-includes/comment-template.php. Replace
$return = "<a href='$url' rel='external nofollow'>$author</a>";
with this:
$return = "<a href='$url' rel='external'>$author</a>";
Removing WordPress rel=nofollow on Comment Text
Links in the actual comments are a little tougher to find. However, I was able to track down where the filter was applied in wp-includes/default-filters.php on line 125. To disable the filter, you need only to remark the link out by putting two forward slashes in front of it. Edit
add_filter('pre_comment_content', 'wp_rel_nofollow', 15);
like this:
//add_filter('pre_comment_content', 'wp_rel_nofollow', 15);
There now, your site members can be rewarded and spammers will be caught! Perfect.
Suggested Reading
Christmas Gifts
Buy Amazing Christmas Gifts on Walmart for your family [..]
US Colleges
Choose the right college with our site. Check some [..]
One Response to “WordPress 2.3 Disable NoFollow”
Trackbacks
Leave a Reply
You must be logged in to post a comment.
Hey There!
March 19th, 2008 at 10:17 am