Tag Cloud

Have you added the rel="nofollow" attribute to your WordPress tag cloud? Here's a YouTube video from Matt Cutts talking about the need to add the attribute to tag clouds, where he explains that passing PageRank through the tag cloud links is probably not the most efficient way to do things.

Unfortunately, the WordPress tag cloud is generated via a function call to wp_tag_cloud and, as a result, you cannot simply add the rel="nofollow" attribute like you would a traditional link.

So, I did a bit of searching and stumbled across a nofollow tag plugin at SmartBlogTips.com that will take care of this for you.

That said, I'm not big on adding plugins if it's just a few lines of code. So, for those of you interested in doing this without the plugin, you can add the following lines of code to your functions.php file:

function add_nofollow_tag($sLink) {
return str_replace('<a href=', '<a rel="nofollow" href=', $sLink);
add_filter('wp_tag_cloud', 'add_nofollow_tag');

That's it. Your WordPress tag cloud should now use the rel="nofollow" attribute.

Thanks SmartBlogTips.com for the simple plugin!

[Image Source: Wordle.com]