View Single Post
Old 04-23-2014, 12:15 AM   #2
guiltyCrown
Registered User
 
Join Date: Apr 2014
Location: UK
Posts: 15
Quote:
/* Nofollow to category links
/*-----------------------------------------------------------------------------------*/
add_filter( 'the_category', 'add_nofollow_cat' );
function add_nofollow_cat( $text ) {
$text = str_replace('rel="category tag"', 'rel="dofollow"', $text); return $text;
}

/*-----------------------------------------------------------------------------------*/
/* nofollow post author link
/*-----------------------------------------------------------------------------------*/
add_filter('the_author_posts_link', 'mts_nofollow_the_author_posts_link');
function mts_nofollow_the_author_posts_link ($link) {
return str_replace('<a href=', '<a rel="dofollow" href=',$link);
}
Like this? or I think you can just return $link in the lsat one and return $text in the first one.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
guiltyCrown is offline   Reply With Quote