How to Highlight Author’s Comments in WordPress

WordPress comments provide blog authors a way to interact with their blog readers.If the reader base is strong & they interact with you regularly then it’s better to highlight the Authors comment’s as it’s easy for you to trackback your previous comments.In this post we will share a simple & easy procedure with you for Highlighting authors comments in WordPress.

There are also some plugins which can do the job for you, but using plugins for small small things will increase the number of queries run in the background & in that process makes your blog to load slowly,so avoid using WordPress plugins for small things.

Steps to Highlight Author’s Comments in WordPress :

Step 1 : Open your style.css from your themes(template) folder and add the following lines of code at the bottom

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

Step 2 : Now open comments.php file which is also located in your themes(template) folder & find the below lines of code

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

Replace the above code with the one below

<li class=”<?php if ($comment->user_id == 1) $oddcomment =”authorstyle”; echo $oddcomment; ?>”></li>

Step 3 : Make sure you assign or change the user id of the author to 1.

How to Highlight Author’s Comments in WordPress Website

From now on the Background of Blog Authors comments will be different from normal readers.I wrote this tutorial after reading a tip from Matt Cutts Blog.

That’s it! We hope that you find this tutorial useful! Please get back to us for learning more tips & tricks for working with WordPress.

  • Michael Belk

    Thanks Chris I think I might try this, it looks good. Many bloggers want to see you are answering blog comments on your blog, I know I do.