This WordPress plugin will easily allow you to uniquely style comments made by a post author. By default, author comments will be given a light yellow background, but this is entirely customizable at the plugin’s options page. Custom styling requires only a basic understanding of CSS.
If you are using a modern WordPress theme, this should work automatically after plugin installation. If it does not, you will need to follow these directions:
- Log in to your WordPress admin panel as an administrator.
- Go to
Appearance > Editor
- Select the
Comments (comments.php)file —
Popup Comments (comments-popup.php)if you use popup comments.
- Locate the opening HTML tag that wraps individual comments. This will be inside of a PHP
foreachstatement. The opening tag should be an HTML
- If this element already has a class name assigned, add the following code within the class name’s quote marks:
<?php if (method_exists($wpac, 'author_comment')) $wpac->author_comment();?>
- If this element does not have any classes assigned, add the following code within the opening before the end of the opening tag:
class='<?php if (method_exists($wpac, 'author_comment')) $wpac->author_comment();?>'
- Click the ‘Update File’ button.