Not sure what you are meaning to do but, if you take a look at the get_comment_class()
function that is responsible for generating the .bypostauthor
class you can see how it determines if the commenter is the author
if ( $post = get_post($post_id) ) {
if ( $comment->user_id === $post->post_author )
$classes[] = 'bypostauthor';
}
You should be able to use this to do something similar.
Related Posts:
- Change Comment Author Display Name
- Check If comment author is registered
- Comment Author Name In Reply Form
- Display all comments or recent comments per user on author page
- how to make author to write comment on only his own posts?
- Let user edit his own comment
- edit comments capability for authors
- Why are authors allowed to approve comments on their posts? How to revoke privilege?
- Hide notifications regarding new comments
- List user comments in author page
- Author can only see own post comment and can moderate
- WordPress comments on users profile
- Comment displaying full name even after setting another display name?
- Same email for all comments
- Notify post author for a new comment on his post?
- How many members have made comments approved for an article?
- Commentlist: bypostauthor problem with children list
- Only Allow post author and “Premium” Role user to comment
- get_comment_author_link not working properly
- Get Comment Author ID on the fly while posting
- How can I hide comment of the authors from their published posts?
- WordPress Custom Local Avatar not showing in comments
- Attaching author tag to the comment
- How to prevent users/authors from seing IP/email of new commentators?
- Author name length character limit?
- Comments counter only for Authors Posts
- Comments pagination on author page
- Change author, disable comments, enable trackbacks for all items in library
- Prevent author from editing comments from others in their post
- URLs to user page is broken
- How to ‘If Author’ Comments Check
- Auto approve all comments (editor)
- Get comments for more than one post
- Add placeholder attribute to comment form fields
- “Categories” for comments?
- Allow anonymous comments, but prevent spam [closed]
- Where to remove from comment’s feed?
- Allow guests comments on single post
- Delete all user comments
- Why do I get email notifications about comments that WordPress has already determined are spam?
- Delayed commenting
- “Leave a comment” link even when you can’t
- An action hook where a comment meta is updated
- Display number of comment replies
- User can post only one comment per day on one page
- Recent comments on author page?
- Last comment page first with full number of comments?
- Only subscriber role user can comment not other
- customize comment form
- How to hide “Comments are disabled”
- WordPress comments just vanished even tho there are about 250+ of them. Where did they go?
- Restore trashed posts with comments
- How to import only certain comments from post[s]
- How to remove ‘Site’ in the comment form?
- Make wordpress comments work with include templatepath
- How do you turn on comments for only the last page of a paginated post?
- How to not load comments form on post preview?
- Sort/list/arrange comments by comment author in un-nested/no thread comments
- Archive comment w/o moving to spam/trash
- Get the top level comment ID
- Custom WP Comments Query with Nested Comments Possible? (Hierarchy/Depth)
- Log file reports SQL Error processing child comments
- Get Post ID within wp_set_comment_status hook
- How to implement comments on specific fields in wordpress?
- 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?
- Safe to remove this: when using a 3rd Party Comment App? [closed]
- 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
- Returning error upon comment being flagged as spam
- I need to disable Disqus comments pre-approval, but i can’t find where
- JetPack comment threads are displaying above comment box? [closed]
- How do i remove approved spam comments by date?
- Page comes up blank using w3 total cache [closed]
- Comment Table Size Results in Slow Page Loads and 500 Errors
- Insert ads between comments
- get_query_var(‘paged’) for WP_Comment_Query always return 1 when using paginate_comments_links()
- How to show username in reply to comment?
- Custom sort comments with select form
- Limit Comment Line Count – Add Read More Button
- Fire Social Annex Code on Comment Approval
- Displaying comment rating stars in carousel
- Enable comments option
- 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
- add field comment [duplicate]
- 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
- How to disable comments on new blog post, but allow on new products?
- Query comments with non-empty ‘author_url’ value on Admin Comments Screen