Add nofollow attribute to category specific links

Go to source

snippet :  PHPcopy
function nofollow_cat_posts($text) {
global $post;
        if( in_category(1) ) { // SET CATEGORY ID HERE
                $text = stripslashes(wp_rel_nofollow($text));
        }
        return $text;
}
add_filter('the_content', 'nofollow_cat_posts');

source →


Add nofollow attribute to category specific links is a post from: wpsnipp.comWordPress Snippets, Code, Hacks, 590+ for your theme, blog
which is not allowed to be copied on other sites.”

Share this post.


Add nofollow attribute to category specific links“>Facebook | Add nofollow attribute to category specific links“>StumbleUpon | Add nofollow attribute to category specific links“>Delicious | Add nofollow attribute to category specific links @wpsnipp”>Tweet It | Add nofollow attribute to category specific links“>Digg This

© wpsnipp.com All Rights reserved.

source: wpsnipp.com