Studio Lounge
Studio Lounge Wed Design and Photography Edmonton
Admin Comment Highlighting for Wordpress
Views

I tried a few examples from the internet and neither seamed to work properly so i adapted the two that i found.

First things first:
Open your comments.php file and look for a line like this.

Code (php)

<li class="<?php echo $oddcomment; ?>" id="comment-< ?php comment_ID() ?>">
</li>


Second:
Simply past the following code replacing the PHP “< ?php echo $oddcomment; ?>“. Replace my@mail.com with your email that your wordpress admin account uses.

Note: This email address will not be viewable by the public as it is parsed in the php, it will not be displayed.
Code (php)

< ?php
/* Only use the authorcomment class from style.css if the email is set to the admin email. */
if ($comment->comment_author_email == "my@email.com")
$oddcomment = authorcomment;
echo $oddcomment;
?>
 

Last:
Create a new css class called “.authorcomment” save your file to your theme directory and presto! Highlighted admin comments.

Enjoy!

Add this too -

No Responses to “ Admin Comment Highlighting for Wordpress ” Jump

Leave a Reply