How to Highlight Authour’s Comment in WordPress

How to Highlight Authour’s Comment in WordPress

If you have enabled comments on your WordPress blog, you may get tons of comments. So, it becomes difficult for someone to find the comment of the author.

Suppose you have commented on a solution, it is necessary to show properly for readers. That is the reason you need to highlight author comments in your money making WordPress blog.

You can highlight the author’s comment in many ways. You can use a plugin, or you can use some codes for it. In this article, I am going to teach you, how to highlight author comment.

Benefits of Author’s Comment Highlighting

When your readers can differ the comments, it becomes easy for them to find any info. Also, this gives a signal that you are interacting with your readers.

This increase the audience trust. When you are giving a reply to a particular question, readers can easily find it. It also allows you to help your readers properly.

Using Premium Theme

Though you can highlight the author comment with codes, but it is also possible with themes. Some premium WordPress themes provide the facility.

When the author comments in the post, it will be an opposite color of the reader comments.

Even, when you are giving a reply on a comment, the color will be different. However, this feature is not available with all WordPress themes. So, you may need to find a different way. In the next part, I am going to giving the instructions.

Highlight Author Comments with Simple Codes

WordPress by default contains some CSS classes that help to change the style of comments. You can apply those CSS codes for highlighting the author comments. Though there are different classes, but the easier one is “bypostauthor.”

This is a unique class of CSS which you can apply for all your posts. You can use this class to change the style of the comment. So, the comments from the author will be different from the readers.

You can use your own background, your own image, etc. using this code.

You can also add a light background for each comment of the author. For doing this, you need to find this code, you can find out this code in your style.css file which is located in your theme folder inside your admin dashboard:- 

1

2

.commentlist .bypostauthor {}

.commentlist li ul.children li.bypostauthor {}

You need to use this code in your style.css file. Using the code in a child theme is easy. You can also use the code using a custom plugin. However, if there are any errors in the codes of the theme, it is not going to work.

For Example, Just have a look at Matthew Woodward’s site. His all comments are highlighted with a different color background whereas reader’s comments have a white background.

You can also design your comments same like this. You just have to find the above code and add these codes in your style.css file:

.commentlist .bypostauthor {border-top: 10px solid #d3d3d3;}

.commentlist li ul.children li.bypostauthor {border-top: 10px solid #d3d3d3;}

Now, this is done. Just save the style.css file and see the changes on your site. You can use whatever color you like.

However, you should change the background color according to your sites color scheme. This will look more natural.

Adding Badge

Sometimes it is not enough to add a shade or background to the comment. You may want to use a badge for the author. It appears more beautiful in a WordPress blog. For adding a badge for the author, you can follow the following steps.

There is a plugin named Comment User Badge WordPress Plugin. This plugin helps to display a little badge for each comment. It will add the badge according to the person.

The badge for the reader and the author will be different. You can separate badges for author, administrator, contributor, editor, subscriber, etc. The plugin loads a style sheet in your WordPress theme. So, you can add various colors for different badges.

So, all steps for highlighting author comments are-

  1. Use the by default WordPress CSS class .bypostauthor.
  2. Add the class in your CSS stylesheet.
  3. Change the background color that matches with your site’s color scheme.
  4. Add a badge to the Comment User Badge WordPress Plugin if you wish.

 

That’s all. I want to finish this article with no more extra things. I hope you can easily understand how to change the color of your comment box in your site. If you get confused at some point, feel free to leave a comment below. If you liked this article, just share the article and like our facebook page to get updates easily. :)

 

 

 

Write a Comment