nofollow – No more. WordPress Hacked

I’ve uploaded a new theme today and somechanges to my blog.
Don’t worry I don’t think that ugly picture of me will be staying for too long.

One major change, that will hopefully temp more people to comment on this site is that I’ve removed the “nofollow” from the comments. By doing this I’m making the links that my visitors leave when they comment count towards backlinks for their site. The more “real” links that you have to a website, the better for the site as search engines count these links towards the sites popularity and it may help boost the sites page rank too.

you comment i dofollow

So if you’ve been shying away and not posting comments on here, now is your chance. Post a comment, leave a link to your site and it will count towards your sites popularity.

I’ve tried to do this before by using a plugin for WordPress, but couldn’t get it working. Instead this time I’ve directly hacked the code for WordPress. Only 1 line, but hacked it nonetheless.

Here is the hack from Douglas Karrs site.

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);

Voila! No more punishing your users for generating great content on your blog! The advantage of doing it this way is that you’re not applying more code later in a plugin to remove the code that was there in the first place. The disadvantage of doing it this way is that you’ll have to update it each time you upgrade WordPress on your site.

I take no credit for this i only found his site via a google search.

I think this is thoroughly worth doing to encourage comments to your blog, I may think again if I get too much comment spam. Meaningful comments that encourage discussion will always be accepted by me.

8 thoughts on “nofollow – No more. WordPress Hacked

  1. hehe yeah i thought about that, but i do want to encouarage useful and meaningful comments.

    NOTE: all comments are moderated by me anyway, if you’re not adding any value to the post, i’m not adding the comment!

Leave a Reply

Your email address will not be published. Required fields are marked *