Skip to main content
added 19 characters in body
Source Link
Milo
  • 78.8k
  • 4
  • 127
  • 168

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
}

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:

if( $comment->user_id === $post->post_author ) {
    // is author comment
}

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
}
added 158 characters in body
Source Link
Milo
  • 78.8k
  • 4
  • 127
  • 168

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:

if( $comment->user_id === $post->post_author ) {
    // is author comment
}

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.

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:

if( $comment->user_id === $post->post_author ) {
    // is author comment
}
Source Link
Milo
  • 78.8k
  • 4
  • 127
  • 168

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.