SEO

Nofollow WordPress 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:

1
2
3
4
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]

John Crenshaw
John Crenshaw
President
UFO company founder. 15+ years experience in performance marketing.
Never miss an update
Get more training, case studies and ideas delivered directly to your inbox.
* We never share your personal info.
View our Privacy Policy.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Let’s make something great together
Let’s talk.

Get in touch and we’ll setup a quick call to discuss your needs, what we do, and figure out if we’re a good fit.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.