Site logo

Archived topic

Highlight comment by post author

3 replies · Started by David on September 6, 2016

Viewing posts 1–4 of 4

When a post author comments on his/her post I want to make them stand out from all other comments by adding a background colour. I'm using the following to achieve this:

.bypostauthor .comment-content{background:#EDF8FF;}

The only problem is, that when somebody else posts a reply to one of the author's comments, that reply also gets the same background colour.

Any idea how I can stop this happening?

Give something like this a try:

.comment-author-admin > .comment-body > .comment-content {
    background: #EDF8FF;
}

Thanks Tom, I managed to get it working with a small change to your code:

.bypostauthor > .comment-body > .comment-content {
    background: #EDF8FF;
}

Awesome, glad you got it working :)

This archived topic is closed to new replies.