Highlight author comments

Highlight Author Comments automatically displays comments made by a post’s author in a distinctive style. Adding this PHP code to your comments.php will add the class authcomment. The bellow CSS will let you change the background color of the author comment.

 

 

<li class=”<?php
/* Only use the authcomment class from style.css if the user_id is 1 (admin) */
if (1 == $comment->user_id)
$oddcomment = “authcomment”;
echo $oddcomment;
?>”

.authcomment {
background-color: #B3FFCC !important;
}

Be Sociable, Share!

Leave a comment