Support » Fixing WordPress » Put an image next to author's name in comments

  • I’ve figured out how to put an image (I use a small star) next to author’s name in the comments. I know WordPress already has CSS classes for author, admin, etc. but these classes apply to the whole <li> element and I wasn’t sure how to make use of them.

    <?php
    if (get_the_author_meta('ID') == $comment->user_id) {
    echo ' <img src="YOURIMAGE" title="Author" height="12" width="12" />';
    } ?>

    Just sharing, and, does anyone see a problem with this thing? It seems to be working fine for me, hopefully it won’t slow down the comment loading a lot.

  • The topic ‘Put an image next to author's name in comments’ is closed to new replies.