This may seem like an odd request, but I need to have all links within posts to be no follow - How can that be accomplished? Thanks for any help and advice
Try this code it should do the trick!! Add it to your theme's functions.php Edit 1 in in_category(1) to the category ID # you want it to work on: ?php function nofollow_cat_posts($text) { global $post; if( in_category(1) ) { $text = stripslashes(wp_rel_nofollow($text)); } return $text; } add_filter('the_content', 'nofollow_cat_posts'); ?>
I thought Wordpress already made all comment links (both in name and in comments) as nofollow. So do you have to do extra coding to make links within comments nofollow?
Your exactly right. Wordpress is nofollow by default,to get the links follow you have to add code or get a plugin that will allow you to set what you want followed and nofollowed. He asked for the code for nofollow so i gave it him. Maybe he has followed links or why would he ask for the code.
I viewed the source code and there was no "nofollow" tag on the links. The only tags on the links were target="_blank" I am not interested in the comments. I want to make all links within the posts nofollow
I did this Now the links are showing rel="bookmark" How does that relate to "nofollow" I did a bit of searching and didnt see a definitive answer on that.
There are plugins you can download that will do it all for you in one shot. I was looking for one that worked but the guy seems to have resdesigned his site. If you want to PM me I'll zip it up and email it to you. Super easy. It was made by Mattgeri.com Rob
I found WP plugin: Add Link Attribute at http://guff.szub.net/2005/01/27/add-link-attribute/ This worked like a charm. I was able to add target="_blank" and rel="nofollow" to post content links