Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

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.

share|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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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