Hi there,
I've written a simple function in my functions.php to display the list of comments slightly differently than the default wp_list_comments() output. So my function code looks like this:
function theme_comments ($comment, $args, $depth) {
$GLOBALS['comment'] = $comment; ?>
<li <?php comment_class(); ?> id="comment-<?php comment_ID() ?>">
<?php echo get_avatar(get_comment_author_email(), 40); ?>
<?php comment_text() ?>
<p class="comment-author">Posted on <?php printf(__('%1$s'), get_comment_date()); ?><br />by
<strong><?php printf(__('%s'), get_comment_author_link()) ?></strong><?php edit_comment_link(__('(Edit)'),' ','') ?>
<?php if ($comment->comment_approved == '0') : ?><br /><strong><?php _e('Your comment is awaiting moderation.') ?></strong><?php endif; ?>
</p>
<hr />
<?php } ?>
Now this works fine, but I would like to fine tune this a little. Notice the hr tag at the end of the code. I would really prefer if that horizontal rule would not display for the last comment for the post. For example if there is only one comment, there is no need to have that divider line between comments.
Any suggestions are greatly appreciated.