Support » How-To and Troubleshooting » How to highlight author’s comments

How to highlight author’s comments

  • While I was implementing the Author Highlight plugin, I noticed something in my theme’s code that appears to do that for me.

    In my comments.php file it has this:

    <li class="<?php /* Style differently if comment author is blog author */ if ($comment->comment_author_email == get_the_author_email()) { echo 'authorcomment'; } ?> item" id="comment-<?php comment_ID() ?>">

    Only thing is, I don’t know what to do to activate it.

    Any suggestions?

    My site: http://www.familywebwatch.com/blog

Viewing 2 replies - 1 through 2 (of 2 total)
  • I suppose using a plugin would be the backup here, but would prefer to use the existing code in my theme. Any suggestions?

    I recently added that functionality to my own theme. The short answer is that you need to put your author email into your comments.php and then look at the source HTML of comments you’ve made on your blog to see what CCS they’ve been given. Then you can set the color you want them to be in your style.css. It’s a little hard to say for sure, though, since I haven’t seen your theme.

    You could also take my post about how I implemented styling wordpress comments on my site. You should be able to copy the info you need and get it working within ten minutes or so.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to highlight author’s comments’ is closed to new replies.