No follow attribute is becoming a very important element for SEO. Tag Cloud forms a very important part of Blog Navigation and Internal Linking system in WordPress. If you want to increase Google PageRank of your website Home page, try nofollowing unimportant internal links.

If you want to add the rel=”nofollow” attribute to your WordPress tag cloud, following is a short snippet for your functions.php file, that attaches a rel attribute with a nofollow value to every link produced by the wp_tag_cloud built-in function.

function add_nofollow_tag($tagLink) {
	return wp_rel_nofollow($tagLink);
}
add_filter('wp_tag_cloud', 'add_nofollow_tag');

wp_rel_nofollow is a WordPress built-in function to adds rel=”nofollow” string to all HTML entities A elements in content.

Reference:

You may also be interested to learn about add custom field to category, more tag for pages, exclude category from wordpress loop and get all taxonomy terms.

Leave a Reply