If you use the comment_class
function to add classes to each comment, comments by the post’s author can be styled via the bypostauthor
class.
You can alternately match the comment ID against the post ID:
global $post;
if( $comment->user_id === $post->post_author ) {
// is author comment
}
Related Posts:
- Comments counter only for Authors Posts
- Change Comment Author Display Name
- How to add internal, revision comments to page updates
- Check If comment author is registered
- What’s the easiest way to close comments on media/attachments?
- 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?
- How to check if commenter is the_author?
- Let user edit his own comment
- Send Notifications to All Admins
- edit comments capability for authors
- Report spam button
- 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?
- Filter In Reply comments from WordPress Admin Panel
- Same email for all comments
- Notify post author for a new comment on his post?
- warnCommentChanges always being triggered on update
- How many members have made comments approved for an article?
- Commentlist: bypostauthor problem with children list
- How do I disable the discussion notification emails to us when a comment is “approved” and when an adiministrator replies?
- Only Allow post author and “Premium” Role user to comment
- Admin Dashboard – Recent Comments source
- get_comment_author_link not working properly
- Get Comment Author ID on the fly while posting
- Styling Admin comments in WP 3.1.3
- Prevent users to delete comments from trash
- How can I hide comment of the authors from their published posts?
- WordPress Custom Local Avatar not showing in comments
- How do I add custom field to Admin comment form and display
- Attaching author tag to the comment
- How to prevent users/authors from seing IP/email of new commentators?
- Author name length character limit?
- where can I find the missing comments in my wordpress dashboard?
- 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
- How to enable reply button on mostly deeply-nested comments? [closed]
- URLs to user page is broken
- Auto approve all comments (editor)
- Identify and display the fact that user is admin next to username in comment section
- edit-comments.php in Admin – how to change ‘Comments’ title?
- Query comments with non-empty ‘author_url’ value on Admin Comments Screen
- How do I comment out a block of tags in XML?
- R: Comment out block of code
- Why do I get comment spam even with Akismet and Captcha?
- What tools are available for managing/writing to WordPress? [closed]
- How to rearrange fields in comment_form()
- setting comments off as default for pages and custom post types?
- Is it possible to pull comments from facebook into your blog?
- Find out which moderator approved comment?
- Filtering the Admin Comments List to Show Only Comments from the Current User?
- Non-threaded comment replies with link to original comment
- Approve comment hook?
- Commenting in user profile page?
- How to change “You must be logged in to post a comment.”
- comment_post_ID 0 (cannot remove from dashboard)
- Disable comments on all posts/pages
- How do I delete all comments from a specific old blog post?
- Removing the “Website” Field from Comments and Replies?
- Stop WordPress redirecting comment-page-1 to the post page?
- Importing old Disqus comments into WordPress
- How to add a class to the comment submit button?
- How to wrap submit button of comment form with div
- How to enable comments for pending and draft posts?
- Using WordPress’ WYSIWYG for comments
- Enable Submit Comment Without Page Reload (Using Ajax)?
- What for is the table “wp_commentmeta” exactly?
- Getting Post Comments for post ID using WP_Query() and a Custom Loop?
- Add option to disable comments on a per posts basis?
- Resetting comment count
- When importing – failed to import: Invalid post type feedback
- How to change the email notification recipient (user) for new comments?
- Redirect user to a custom url after submitting the comment
- Paginate result set from $wpdb->get_results()
- Would switching to InnoDB from MyISAM improve performance of comments table?
- Custom comment type based on thread level
- How to load and show comments with AJAX instead of pagination?
- Linking to Page Showing Only Comments Without Parent Post
- Comment Reply javascript
- How do we remove the H3 tag for the reply-title I.D
- Comments not appearing at all
- comments reply script not working
- How to display comment form error messages in the same page
- 3 moderators to approve comment
- How to deal with small scale comment spam on small commercial sites? [closed]
- Display Authors Comments on Profile Page
- What should I do to make generated avatars different for anonymous comments?
- A plugin where users can comment with Facebook or Twitter or OpenID [closed]
- Comments screen in backend, how to disable email address of commenter for non admins
- Add comments from the admin panel?
- How can I limit the number of comments per registered user per day?
- One comment per user per post but be able to reply to existing comments
- How to use a custom comments template
- Comment visibility