Skip to main content
WordPress made easy with the drag & drop Total WordPress Theme!Learn More

How to Highlight Author Comments in WordPress

Last updated on:
How to Highlight Author Comments in WordPress

One of the cool features of the premium theme I am currently working on is that comments made by the author of the post will be a light blue as opposed to the default gray color. What is great about highlighting author comments is that readers will notice right away when the author has replied to their comments (ideal in community type blogs). And even better yet, it super easy to do. Below is a very simple guide showing you the CSS class you can use to target your author comments differently.

Highlight Author Comments In WordPress Instructions

WordPress by default includes custom classes for your comments that allow you to style them different. One of these unique classes is “bypostauthor” which is a unique class added to all comments made by the author of the current post allowing you to style comments by the post author differently then comments by readers.

Here is some example CSS you can add to your site that will make the comments by the post author blue:

.bypostauthor {background: #ffff99;}

This code should be added in your style.css file (preferably a child theme if you are using a theme by another developer) or via a Custom CSS plugin. If you notice that nothing happens when you enter that code, then most likely your theme hasn’t been coded correctly and you will need to contact the author of the theme so they can fix and update their theme accordingly.

Author Comment Highlight Example

Here is a quick screenshot of the comment structure of the premium theme I am currently working on. As you can see the default comments are gray and the author comments are blue.

Highlight WordPress Author Comments

If my instructions weren’t helpful maybe the highlighting author comments guide by Matt Cutts would be helpful so you should go check them out.

How to Display “Badges” in Your WordPress Comments

Another great way to “highlight” comments is to display the user type/role of the person leaving the comment (subscriber, contributor, author, administrator). Luckily we’ve created a free plugin you can use to automatically add these “badges” to your WordPress site. Simply download, install and activate our Comment User Badge Plugin for WordPress. Below is a little screenshot example showing how it would look.

comment-user-badge

How Do You Highlight Comments?

We know there are many ways of highlighting comments to make some stand out or make it easier for your visitors to have meaning full conversations via your comments. Let us know what you do on your WordPress site in the comments below!

Subscribe to the Newsletter

Get our latest news, tutorials, guides, tips & deals delivered to your inbox.

2 Comments

  1. SparkJunction

    Google seems to be able to index comments… at least Facebook, probably Disqus and perhaps even WordPress comments… I’m also pretty sure they’ll start using all of these for ranking sites!

    • Kyla Avatar Kyla

      Definitely. Comments provide unique content for your site so the more comments your site has the more unique content it will have as well. I do believe it will help your SEO efforts when you have high quality comments on your site that add value to your posts.

Leave a Reply

Your email address will not be published. Required fields are marked *

Learn how your comment data is processed by viewing our privacy policy here.