This post may be a bit hard to follow, get it? I know we all hate a complex post, but that’s the nature of this site. Today’s post will deal with the “rel=NoFollow” rule that is present in the WordPress software and how you actually deal with it so that you have what is called in Blogging as a “DoFollow” Blog.
First “NoFollow” is an attribute which tells the bots of the world which links in the comments section are worthy to follow and which are not to be followed. Unfortunately you can’t provide this information yourself, WordPress does it for you automatically. And it is always set at “NoFollow”.
There are a number of plug-ins that deal with this issue but I prefer a “hard code” to avoid a lot of junk in the trunk.
As I stated above that “NoFollow” is an attribute. There is no such thing as a “DoFollow” attribute. There is ………. well nothing! I usually use “friend” as my attribute within my code to make my Blog a “DoFollow” Blog. However you can you use anything you want really. So you can use “DoFollow” or “friend” or “Spamin’ Sammy” because the bots only see one thing “NoFollow” or nothing. So whatever you wish to place in between the quotes is good with the bots, they will follow any link so long as “DoFollow” is not present. The potically correct way to do things however is to just leave the quotes empty. So you would be looking at “NoFollow” in your line of code. And you would change this to ” “. That’s right, nothing! However it makes finding things a bit diffuclut for me so I just put “friend” in my code. I told you this post would be hard to follow! Now ……….. where to put the code!
Your edit takes place in “wp-includes > formatting.php” The edit is shown below and can be found on about line 1290 or so of this file:
function wp_rel_nofollow_callback( $matches ) {
$text = $matches[1];
$text = str_replace(array(‘ rel=”nofollow”‘, ” rel=’nofollow’”), ”, $text);
return “<a $text rel=\”nofollow\”>”;
The nofollow Attribute can be found in a number of files and in a number of locations within those files. But just stick to the edit below and you should be fine.
$text = $matches[1];
$text = str_replace(array(‘ rel=”nofollow”‘, ” rel=’nofollow’”), ”, $text);
return “<a $text rel=\”dofollow\”>”;
You Blog will now automatically follow all comments that you approve. Two points to remember:
1. Do Not add another attribute to the comments when and if you edit them. This will cause the bots to “NoFollow” the comment link.
2. When you go to upgrade your WordPress Version. The upgrade will overwrite the edit that you placed in the formatting.php file.









