I just wanna convert all links to no follow links which are being displayed in sidebar or footer or comments.

How can i do this?

link|improve this question

feedback

1 Answer

up vote 2 down vote accepted

wp_rel_nofollow() does this for you. It is already called on pre_comment_content, so comments should be covered. For sidebars and footers, this depends on the widgets and other code you use there, but it should be possible to call that function there too.

link|improve this answer
is this filter applied by default? or do i need to apply it. – articlestack Oct 20 '10 at 2:42
@articlestack: It is applied to comments (via the pre_comment_content filter) in default-filters.php, so that should be OK. For the sidebars you should do this yourself, unless you use a widget that already does this. – Jan Fabry Oct 20 '10 at 13:36
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.