Grow your CSS skills. Land your dream job.

Help Highlighting admin comments in wordpress

  • # October 11, 2012 at 10:48 am

    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;
    ?>
  • id="li-comment-< ?php comment_ID() ?> ">



    < ?php echo get_avatar($comment,$size='48'); ?>
    < ?php printf(__('%s says:'), get_comment_author_link()) ?>

    < ?php if ($comment->comment_approved == '0') : ?>
    < ?php _e('Your comment is awaiting moderation.') ?>


    < ?php endif; ?>



    < ?php comment_text() ?>


    < ?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args))) ?>


    < ?php
    }
  • Thanks in advance,
    Mike

    # October 11, 2012 at 1:24 pm

    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?

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".