This is a read-only archive!

nofollow

Someone recently mentioned that author comment links in my blog were all given a nofollow attribute. So I wrote a plugin that removes nofollow from comment author links. If you search around it's not hard to find a million other plugins that do the same thing. Putting something like this into /wp-content/plugins (and activating the plugin) should probably do it:

<?php
/*
Plugin Name: Remove nofollow
Plugin URI: http://briancarper.net
Description: Remove 'nofollow' from comment author links
Version: 1.0
Author: Brian Carper
Author URI: http://briancarper.net
*/

function remove_nofollow($text) {
    return preg_replace('/ rel=\\'.*?\\'/', '', $text);
}

add_action('get_comment_author_link', 'remove_nofollow');

?>

There is apparently some amount of controversy about nofollow. Who woulda thought. I personally don't see much need for it. Links are links. If I didn't want links to be followed, I wouldn't post them or let other people post them in the first place.

October 04, 2007 @ 8:51 AM PDT
Cateogory: Programming

1 Comment

bug
Quoth bug on October 06, 2007 @ 6:05 AM PDT

Thanks, and thanks for calling me somebody. Also, the talk about it is bigger than you think. Though I don't remember where I saw that in the first place.