1

I want my plugin to add extra text after a comment author's name. For example if they've commented as "Albert", I might want the comments section to display their name as "Albert (genius)".

I'm trying to use the comment_author filter as follows, but it doesn't seem to have any visible effect:

function my_author_filter($author) {

    return $author . '( genius)';

}

add_filter( 'comment_author', 'my_author_filter'); 

Thanks

1 Answer 1

1

Sometimes themes call get_comment_author instead, and bypass the comment_author function. Try using that filter instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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