Support » Plugins and Hacks » alternating visitors and admin comments css?

  • I was able to get alternating comments colors with this code I found on the forum.

    <?php if ( $comments ) : ?>
    <?php $i = 0; //this creates alternate classes for comments ?>
    <?php foreach ($comments as $comment) : ?>
    <?php $i++; ?>
    <div id="comment-<?php comment_ID() ?>"<?php if($i&1) { echo 'class="commentBox_even"';} else {echo 'class="commentBox_odd"';} ?>>

    Works with no problem, however now I need to highlight admin comments as well, how should I proceed?

    Thanks to everyone.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I forgot to mention, I already checked all available plugins including the above one, I rather implement this function inside the template code, beside I already have too many plugins active.

    I’m not a coder but I was thinking that would be possible to modified that code to check if the author is admin and apply comment-admin or something along that line.

    Thanks and a happy 2008 to everyone

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘alternating visitors and admin comments css?’ is closed to new replies.