PageRank was invented by Google’s co-founder and current CEO, Larry Page, and it’s one of the determining factors in where pages rank in Google. Google views links to other websites as votes of confidence that the website has quality content. It’s not entirely democratic. Pages that have been deemed important by their higher PageRank in turn exert more influence with their links. This transfer of importance is also called “Google juice.”
Sometimes you don’t want to add additional Google Juice to Affiliate or marketing link. There’s an easy solution. Use the nofollow tag. Google won’t follow the link, and you’ll remain in good standing with the search engine.
Example:
<a href="http://examplesite.com" rel="nofollow">Your anchor text here.</a>
If you want to add nofollow to all links in a specific category then simply put below code to your functions.php file.
function crunchify_nofollow_cat($text) { global $post; if( in_category(1) ) { // YOUR CATEGORY ID HERE $text = stripslashes(wp_rel_nofollow($text)); } return $text; } add_filter('the_content', 'crunchify_nofollow_cat');
List of all WordPress Tips.
The post WordPress: How to Add NoFollow Attributes to all Links in a Specific Category appeared first on Crunchify.