How to Change Comment Colour in WordPress

How to Change Comment Colour in WordPress

When visiting some sites, you find it hard to track author’s comments. This is why many WordPress and Blogspot sites highlight their author’s comment by making it a different background color, adding an image, etc. If you want to know how to highlight author’s comments in WordPress, you are in the right place. In this Post, we will show you the easiest and simplest way to highlight author’s comments on your WordPress site.

How to Highlight Comments in WordPress

WordPress by default generates a number of CSS classes which makes it easier for designers and users to change the styles (WordPress CSS Cheat Sheet). Among those default classes that WordPress has added, one of those is specifically targeted for styling author’s comments.

Read: How to display Comment Counts in WordPress

The class is called .bypostauthor which can be found in the .commentlist element. All you have to do is add your custom styles by using CSS. For example, you can add your own background, your own image, etc. Note: this code will be found in your style.css file located in your theme’s folder.

.commentlist .bypostauthor {}
.commentlist li ul.children li.bypostauthor {}

This isn’t super complex. Often it is a rather simple distinction that highlights author comment

Read: How to Re-arrange Comments in WordPress

Note: we strongly recommend that you change the color to match your color scheme

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

Related Post

Also Read  Best Way to Start a WordPress Blog and Make Money (in 2018)

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close Menu
×

Cart