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?


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.

  • is this filter applied by default? or do i need to apply it. 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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