The One-Minute Dofollow WordPress Upgrade
Post #400 categorized as Function, WordPress, last updated on Apr 20, 2008
Tagged with comments, dofollow, hack, links, nofollow, php, tutorials, WordPress
Want to upgrade your blog to official dofollow status but don’t want to install another unnecessary plugin? This article explains how to eliminate nofollow tags from all trackback, pingback, and commentator links in less than one minute..
After finally repenting of my nofollow sins, I began looking for the best way to eliminate the nofollow attributes that WordPress automatically injects into all commentator URL links.
Of course, the most popular technique for removing nofollow attributes from comment links involves one of the many fine dofollow plugins that are freely available to WordPress users. Beyond nofollow removal, many of these plugins also provide additional features, such as control over when and where nofollow tags should be removed. Many of these plugins are highly recommended.
After considering the various dofollow plugins, I came to the conclusion that most of them were simply overkill. My goal was to remove all nofollow attributes from commentator links — nothing more, nothing less. For this site, I just don’t need all the fancy bells and whistles. And I certainly don’t need yet another resource-draining plugin to worry about..
So, I decided to (gasp!) hack the WordPress core itself. It is not only possible to remove all nofollow tags without a plugin, it is absolutely, positively, drop-dead easy to accomplish. Don’t believe me? Check it out..
The One-Minute Dofollow WordPress Upgrade
- Open
wp-includes/comment-functions.phpand locatefunctionget_comment_author_link() - Within that function, find
rel='external nofollow'and delete thenofollow(and preceding space). - Done.
And that’s all there is to it. After removing that single parameter, every author link for comments, trackbacks, and pingbacks will be followed by search engines and thus pass link juice to their target pages. No plugins required!
Share this..
Related articles
- The Deluxe One-Minute Dofollow WordPress Upgrade
- Industrial Strength WordPress Dofollow Upgrade
- Hacking WordPress: Dofollow Whitelist for Commentator Links
- Much ado about nofollow: The Perishable Press Dofollow Series
- Hacking WordPress: Nofollow Blacklist for Commentator Links
- Comprehensive Reference for WordPress NoNofollow/Dofollow Plugins
- Hacking WordPress: The Ultimate Nofollow Blacklist
#1 — Hell's Handmaiden
Nice. I’ve thought about killing ‘nocomments’ but I didn’t much feel like running yet another plugin on my site. Your solution removed that concern. And removing the ‘nofollow’ was every bit as easy as you say.
If I might add, gray text on black is terribly hard to read, especially with a font size as small as you’ve chosen.