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 );
Related Posts:
- Is it possible to pull comments from facebook into your blog?
- Enable Submit Comment Without Page Reload (Using Ajax)?
- How to deal with small scale comment spam on small commercial sites? [closed]
- Get comments for more than one post
- Add placeholder attribute to comment form fields
- human_time_diff() returns “48 years ago” for all comments
- How to hide “Trackback” on paginated comments
- Is it possible to show custom comment metadata in the admin panel?
- Display all comments or recent comments per user on author page
- Does WordPress Allow Blank/Empty Comment Submissions In WordPress?
- comment_reply_link() not showing up
- How to show Disqus comment count number only without text?
- How can comments be submitted when I don’t have a comment box on a page?
- Altering the pingback functionality
- how to have 2 comments_template() in one post
- adding more fields to the comments form including image upload
- How to Delete Old Comments by Date?
- Display comment meta data after quick update
- get_comments() where parent is not 0
- How to hide “Comments are disabled”
- Get number of comments per page
- WP comments form (custom) is displaying an extra comment field
- WordPress comments just vanished even tho there are about 250+ of them. Where did they go?
- WordPress Comment. Need some details of wp_comments DB table
- Custom disqus_identifier not properly changing default value
- Edit Comment_Field while using T5 Comment Textarea On Top-Plugin
- Registered but Anonymous comments
- Restore trashed posts with comments
- How to import only certain comments from post[s]
- Make wordpress comments work with include templatepath
- How can I stop WP from automatically marking “Automatically close comments on articles older than 28 days”? [closed]
- Callback function argument which is required for wp_list_comments ()
- The comment login form is visible to me but not to the user
- How to insert a comma to the child comment construction in function.php?
- Get the top level comment ID
- Custom WP Comments Query with Nested Comments Possible? (Hierarchy/Depth)
- Log file reports SQL Error processing child comments
- Editing WordPress comments : generating comment from selection
- how to properly use comments-template.php
- Reply By Email to comment notifications
- Get Post ID within wp_set_comment_status hook
- How to implement comments on specific fields in wordpress?
- wp_list_comments renders incorrectly nested
- Alternative to the filter comment_reply_link
- Number/ Position of a Comment
- code highiglight not working comment
- Comment number does not increment
- get_comments not working consistantly with post_id
- Comments are invisible, what’s the problem with wp_list_comments?
- WP confusing “links to my articles” with “comments”?
- How to check if a comment has replies?
- Can I have Comments open to specific users only?
- How to edit the text below “Leave a Reply”
- Commenting system for WordPress
- Commentlist: bypostauthor problem with children list
- Comments does not work?
- How do I disable the discussion notification emails to us when a comment is “approved” and when an adiministrator replies?
- Review count per product
- Moving post’s content to post’s comments section
- comment_notes_before not working
- why can’t I retrieve the comment ID?
- get_comment_link without pagination base in the returned URL?
- Comments on future posts
- Copy and Paste Password for Comments
- Returning error upon comment being flagged as spam
- is it possible to have the full code instead in the comments.php page
- JetPack comment threads are displaying above comment box? [closed]
- How do i remove approved spam comments by date?
- Remove Javascript generated by Comments
- How to Trigger comment_form_after action if comment_form() not used
- Page comes up blank using w3 total cache [closed]
- Insert ads between comments
- get_query_var(‘paged’) for WP_Comment_Query always return 1 when using paginate_comments_links()
- How to only show current user’s comments and comments on current user’s posts in wp admin
- How to make author comment name to “Editorial Staff” no matter which ever author is replying to comments from his/her account?
- Changing the Comment Fields using Filter (without success)
- How to show username in reply to comment?
- Comments pagination: reverse JUST the links texts (1-2-3 to 3-2-1), not comments order
- Display date and time into post edit comments section
- Disallowed Tag Present in AMP WordPress ()
- Subcriber getting multiiple notifications for new comments
- Comments/Discussion Not enabled on newly created posts/pages
- Fire Social Annex Code on Comment Approval
- How can I enable commenting from mobile view?
- Change Comment Text [duplicate]
- Comments closed but enabled on edit screen
- Let user delete comment on front end only
- jQuery to Create Button to Show/Hide WordPress Comments and to Hide Comments by Default
- Comment form – different title if no comment yet
- WordPress Comments jQuery Doesn’t submit
- Insert comment and still use moderation
- Let users comment on categories in WordPress
- Loop not displaying comments_popup_link
- Display of comment_date within get_comments?
- How to batch convert comments to posts?
- prevent duplicate comments using wp_insert_comment
- I need help about wordpress of members section
- comment awaiting moderation
- How do you fetch the authors email or IP from /comments? (REST API)
- WordPress Editor widgets “comments” and “post comments form” getting disappeared with elementor [closed]