Add nofollow to wordpress blogroll links

It seems there is a fair amount of posts on the subject of adding rel=”nofollow” to wordpress links already but the ones in my Google search were all for older versions and not for the latest version (WP v3.1.2) so I thought I would update the situation.

Locate the file “bookmark-template.php” in the wp-includes folder. The line you require is around the 99 mark if the file is previously unedited. Look for:

$output .= '<a href="' . $the_link . '"' . $rel . $title . $target . '>';

All you need to do is add the rel=”nofollow”

$output .= '<a href="' . $the_link . '"' . $rel . $title . $target . 'rel="nofollow">';

NOTE:
Ensure you have all rel options in the link settings set to none. This seem to override this setting.

No comments yet.

Leave a Reply

All comments are moderated before being published!