Highlighting admin comments only
-
I’m trying to highlight just the admin comments in the comments list. 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 calling wp_list_comments
<ol class="commentlist"> <?php wp_list_comments('type=comment&callback=cnc_comment'); ?> </ol>
This is my function in the functions.php file:
// Comments Callbacks, Pingbacks and Style function cnc_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?> "> <div id="comment-<?php comment_ID(); ?>" > <div class="comment-author vcard"> <!--Avatar Call and Size --> <?php echo get_avatar($comment,$size='48'); ?> <?php printf(__('<cite class="fn">%s</cite> <span class="says">says:</span>'), get_comment_author_link()) ?> </div> <?php if ($comment->comment_approved == '0') : ?> <em><?php _e('Your comment is awaiting moderation.') ?></em> <br /> <?php endif; ?> <div class="comment-meta commentmetadata"><?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) ?> <br /><?php edit_comment_link(__('[Edit Comment]'),' ','') ?></div> <div class="comment-body"> <?php comment_text() ?> </div> <div class="reply"> <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?> </div> </div> <?php }
Thanks in advance,
Mike
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Highlighting admin comments only’ is closed to new replies.