Take the 2-minute tour ×

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

1 Answer

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

Your Answer


