I've spent a good while toying with PHP and doing some Googling but I have yet to find a solution: How can I add a CSS class to comments from ALL of the site's authors?
There's countless tutorials on how to highlight the post author's comments, but if another contributor from the site adds their thoughts, how can that comment be highlighted too?
Here's my if() statement:
<?php if($post->post_author == $comment->user_id || in_array($comment->comment_author, $names)) { ?>
$names is supposed to be an array of the display names of every author on the site, but nothing I've tried has been able to create a correct array of those display names.
Maybe the array setup isn't the right way to do this, I don't know. I could go the route of IDs instead of display names but on this particular site, some of the authors created a duplicate user of themselves by accident and weren't always logged into their author account when commenting.
Any tips would be appreciated!
Dan