treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Help Highlighting admin comments in wordpress

  • I'm trying to highlight just the admin comments on a wordpress site. I've tried a bunch of tutorials and I've had no luck. If someone could help/point me in the right direction it would be greatly appreciated.

    In the comments.php file I'm call ing wp_list_comments

    
            
        <?php wp_list_comments('type=comment&callback=cnc_comment'); ?>
      
    

    This is my function in the functions file:

    // Comments Callbacks, Pingbacks and Style
      function cnc_comment($comment, $args, $depth) {
         $GLOBALS['comment'] = $comment;  
         ?>
          id="li-comment-<?php comment_ID() ?> ">
         " >
          
              
           <?php echo get_avatar($comment,$size='48'); ?>
           <?php printf(__('<cite class="fn">%s says:'), get_comment_author_link()) ?>
          
          <?php if ($comment->comment_approved == '0') : ?>
           <?php _e('Your comment is awaiting moderation.') ?>
           
    <?php endif; ?> <?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) ?>
    <?php edit_comment_link(__('[Edit Comment]'),' ','') ?> <?php comment_text() ?> <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>

    Thanks in advance, Mike

  • Just using the default theme I get a class of bypostauthor on any comments that I make. Is that what you're looking to tie into?