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 am trying to find a way to add rel="nofollow" to my comments pagination links.
Can anyone provide me with a hook or way to do so?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

There are two special filters for that:

add_filter( 'previous_comments_link_attributes', 'wpse_77217_comment_nofollow' );
add_filter( 'next_comments_link_attributes', 'wpse_77217_comment_nofollow' );

function wpse_77217_comment_nofollow()
{
    return ' rel="nofollow"';
}
share|improve this answer
    
worked! thank you so much –  Ayaz Malik Dec 26 '12 at 4:06

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.