Parent comment’s author name

In your comment callback, you could get that info with the help of the comment_parent property of the current $comment object.

We can then use the comment_author() function to display the comment author’s name:

// Display the parent comment author's name:
if( $comment->comment_parent )
    comment_author( $comment->comment_parent );

and the comment_author_link() function to display the comment author’s link:

// Display the parent comment author's link:
if( $comment->comment_parent )
    comment_author_link( $comment->comment_parent );

Leave a Comment