Hi,
I'm having some fun toying with 2.7 new possibilities...
I was able to get alternating comments styles by using .odd and .even, but the .bypostauthor does not override them so I don't see different colors when I am the author.
Here is my code:
<?php if ( have_comments() ) : ?>
<?php
/* Count the totals */
$numPingBacks = 0;
$numComments = 0;
/* Loop through comments to count these totals */
foreach ($comments as $comment) {
if (get_comment_type() != "comment") { $numPingBacks++; }
else { $numComments++; }
}
?>
<?php
/* This is a loop for printing comments */
if ($numComments != 0) : ?>
<ol class="commentlist">
<li class="commenthead"><h2 id="comments"><?php comments_number('No Responses', 'One Response', '% Responses' );?> to “<?php the_title(); ?>”</h2></li>
<?php wp_list_comments(); ?>
</ol>
<?php endif; ?>
and the css:
.bypostauthor{
background-color: #E9B5C1; }
.odd {
background-color: #EDC0CB; }
.even {
background-color: #7BCB94; }
Anyone can help me?
Thanks