Note

I know there is another post on this topic. Unfortunately I could not find a solution for my usecase there. So I’m asking this question again.

Situation

Comments made by users that are not logged in return “Anonymous” as the Author Name. Even if the corresponding field in the comment-form was filled.

Code

This is how the authors name is displayed (from the functions.php)

<?php
    /* translators: 1: comment author url, 2: comment author name, 3: comment permalink, 4: comment date/timestamp*/
    printf( __( '%2$s schrieb am %4$s', 'buddypress' ), get_comment_author_url(), get_comment_author(), get_comment_link(), get_comment_date() );
?>

Files that might be helpful:

I’m really not sure how to even find the issue.
My guess from reading similar questions on StackOverflow is, that I have to pass the comment ID to get_comment_author(). But I have no idea how to do this in this case.

Any help is much appreciated! Thanks!

Read more here: WordPress – get_comment_author() returns "Anonymous" as author name


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: