WordPress.org

Ready to get started?Download WordPress

Forums

How to highlight author's comments (3 posts)

  1. davincim
    Member
    Posted 7 years ago #

    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

  2. davincim
    Member
    Posted 7 years ago #

    I suppose using a plugin would be the backup here, but would prefer to use the existing code in my theme. Any suggestions?

  3. xiaoma
    Member
    Posted 7 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic