Hi there,
best i have in my snippets is to add a CSS Class to the Comment if the user is an admin or the post author.
1. Add this PHP Snippet:
add_filter( "comment_class", function( $classes, $class, $comment_id, $comment ) {
if( $comment->user_id > 0 && $user = get_userdata( $comment->user_id ) && ( user_can( $comment->user_id, "administrator" ) || $comment->user_id === $post->post_author ) ) {
$classes[] = "verified-user";
}
return $classes;
}, 10, 4 );
How to add PHP: https://docs.generatepress.com/article/adding-php/
2. Add this CSS to place some text and a tick beside the comment author name:
.verified-user .comment-author cite:after {
content: 'verifed user \2713';
margin-left: 10px;
}