I haven't done too much with WordPress 2.7 until very recently. I was really surprised to see the new way of doing comments. The good news is that wp_list_comments() will list all comments, with threading, and nested replies, all by it's little self. You can turn the nested replies thing on/off from the Settings->Discussion page in the admin.
The bad news is that it spits out all the HTML, whether you like its HTML or not. I was reading on the forums the point of doing it this way was to make everyone control the "look" using styles and you "shouldn't need to change the HTML". What you "shouldn't" need to do has been the argument in favor of most issues I have with WordPress. (Don't get me wrong I do love it.) If all anyone needed to do was just change stylesheets, then everyone's HTML would look the same, because we're all doing the same thing, right? Well, we're not. Half the time I use WordPress for standard blogs – where – sure the "default" HTML is fine and I'll make it work from the styles. The other half of the time, I'm twisting WordPress to do all kinds of funky sites. Following this path of "you shouldn't need to do that" is going to start making that flexibility disappear. Applications "shouldn't" need to spit out HTML. I certainly support WordPress' idea of making it easier to use for the common person – but workarounds should always exist for those of that need a more advanced level of control. On the forums, I saw a perfect, simple reason why someone might want to change the HTML…What if I don't want it to say "blahblah says:". wp_comment_list should include parameters to change some of the hardcoded text like that…Okay. Stepping off my soapbox now.
Thankfully, there IS a way around it. I wish this page had more information, but it's enough to get started at least. On the wordpress codex – you can see the wp_list_comments() function explanation. (Are the three parameters the only ones wp_list_comments() takes?)
Ironic that the first thing they show you is how to bypass the "auto html dump" the function does… so if you want to customize the HTML, call the function like this:
<ul class="commentlist">
<?php wp_list_comments('callback=mytheme_comment'); ?>
</ul>
Then create a functions.php file in your theme directory and use this as a start to customize the HTML of the output:
function mytheme_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">
<?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"><a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) ?></a><?php edit_comment_link(__('(Edit)'),' ',) ?></div>
<?php comment_text() ?>
<div class="reply">
<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
</div>
</div>
<?php
}
There is a note that says there is no ending "li" tag because wordpress will automatically add that itself. (WHY OH WHY?!) I assume if you don't want it to do comments as list items and instead want divs (and therefore end with "/div" instead of "/li"), then you'd change the call to wp_list_comment to:
<div class="commentlist">
<?php wp_list_comments('style=div&callback=mytheme_comment'); ?>
</div>
There is also a comment on the "callback" parameter on the codex: "Use to customize comments display for extreme changes to the HTML layout. Not recommended." Ah. I feel like such a rebel.
A few side notes:
If you're going to use comment threading, paging, etc then this page has some useful info on it on some important things you'll need in your theme files.
And if you are going to keep the default HTML – then you'll probably need to know WHAT STYLES you need to work with! Here is the list.
This page also has some comment styling information on it.
Here is information on the new way to separate pings from comments.