Hi Eric - scratch the above! Using your code deleted the cite :)
(1) This foreach php you use:
<?php foreach ($comments as $comment) : ?>
<?php endforeach; ?>
does not seem to do anything. Can I safely delete it? I'm not alternating background color as you've done.
(2) In my Discussion Settings, I have newer post first, but after I entered your code above in full (then adapted it as below), it over-rode the settings so older post is now first (as it is on your site).
Please can you tell me what to delete in my latest html/css below so I keep newer post first? It's *always* been set to first in discussion settings.
(3) x-browser, IE + Opera say "newer comments" for nav (thus recognizing older are first in display?) and FF says both "older comments" and "newer comments" - thus following the html which says to put both.
Is there a way to have a conditional statement so *only if* there are older or newer posts, it will display these links:
<?php previous_comments_link() ?>
<?php next_comments_link() ?>
WordPress refuses to obey this:
"Break comments into pages with [2] top level comments per page and the [first] page displayed by default
Comments should be displayed with the [newer] comments at the top of each page"
It's displaying older comments first, and displaying *all* comments instead of just 2. As far as I know, all my comments are top-level, because I don't have a "reply-to-this-comment-only" button beneath each comment.
It's a real drag when wordpress gets corrupted like this and basically ignores the settings. It did the same for my sociable plugin. Is there a way to clear the corruption? It was working ok until I added your code above in full and then deleted what I didn't need. Since then it's been corrupted and won't listen to what I say in "discussion settings."
here's my html:
<ol class="commentlist">
<!--<?php foreach ($comments as $comment) : ?>-->
<li class="clearfix" id="comment-<?php comment_ID() ?>">
<div class="comhead">
<div class="comauthor"><?php comment_author_link() ?></div>
<?php if ($comment->comment_approved == '0') : ?>
Your comment is awaiting moderation.
<?php endif; ?>
<p class="comdate"><?php comment_date('F j, Y') ?> at <?php comment_time() ?></p>
</div>
<?php echo get_avatar($comment, $size='65'); ?>
<div class="comtext"><?php comment_text() ?></div>
<!--<?php endforeach; /* end for each comment */ ?>-->
<div class="comnav clearfix">
<div class="flft"><?php previous_comments_link() ?></div>
<div class="frgt"><?php next_comments_link() ?></div>
</div>
here's my css:
.commentlist {margin:0;padding:0}
.comhead {float:left; margin-bottom:5px; width:100%}
.comauthor{float:left; width:50%; font-weight:bold}
.comdate{clear:none; float:right; margin:0; width:40%; font-size:0.8em; text-align:right}
.avatar {float:right; margin:0 0 0 10px; background:white}
.comtext {font-size:1.05em}
.commentlist li {
margin:10px 0; /*space betw boxes*/
padding:10px;
list-style:none; border:1px solid green; background:white
}
.commentlist li.bypostauthor, .commentlist li ul li.bypostauthor {background:#f2ffdf}
.reply{clear:both;margin:1em 0}
.comnav {display:block; text-align:center; margin:10px}
Another problem is since adding your code (then deleting/changing) it no longer recogninzes:
.commentlist li.bypostauthor {background}
(4) Before I entered your code, it was giving me a different background color for comments by the writer of the post. Can you see why it's no longer doing this?
It seems to me wordpress gets corrupted! Everything looks perfectly ok, but somehow by adding your code in full, wordpress freaked out - it stopped giving me different background for author, and stopped displaying the newer posts first.
thank you! - Val