> ## Content Index
> Fetch the complete content index at: https://mfitzp.ghost.io/llms.txt
> Use this file to discover other available public pages before exploring further.

# Highlight author's comments on WordPress blog
- URL: https://mfitzp.ghost.io/highlight-authors-comments-on-wordpress-blog/
- Published: 2012-01-26T00:00:00.000Z
- Updated: 2023-06-25T18:33:49.000Z
- Author: Martin Fitzpatrick
- Tags: Tutorials, Wordpress, #Import 2024-03-14 08:20, #Import 2026-08-24 14:26

In this short tutorial we'll take a look at a simple trick to make comments from the original post author stand out a bit more in the comment listing – useful for seeing replies to comments.

First you need to create a style to apply to highlighted comments on your blog. To do this, either in the admin editor or via SSH/FTP edit the file `style.css`.

Add a line that applies a style to a class called `authorstyle`:

```CSS
.authorstyle { background-color: #fffddf !important; }

```

Here we've set the background to a nice yellow.

Next find the `comments.php` file in your theme folder and look for the following line:

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

```

And replace it with:

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

```

When outputting the comment, this checks whether the `user_id` of the comment poster equals 1 (the admin user, who set up the blog) and if so applies the `authorstyle` class. This will only work on a single-user blog (i.e. if you have more than one author their posts will not be highlighted).