Separating Pingbacks/Trackbacks from comments in WordPress 2.0

Here's some code below to enable you to separate pingbacks/trackbacks from comments in WordPress 2.0. Pingbacks/trackbacks are listed first, followed by comments in this example. It will also not show the excerpt for pingbacks/trackbacks and just show the link for these. The basic idea is to loop through your comments twice - once displaying the […]
Here’s some code below to enable you to separate pingbacks/trackbacks from comments in WordPress 2.0. Pingbacks/trackbacks are listed first, followed by comments in this example. It will also not show the excerpt for pingbacks/trackbacks and just show the link for these.The basic idea is to loop through your comments twice - once displaying the pingbacks/trackbacks and once displaying the comments.Copy and paste this code into your comments template - you’ll need to remove the old display of comments first.
< ?php if ($comments) : ?>
<h3 id="trackbacks">Trackbacks/Pings</h3>
<ol class="commentlist">< ?php foreach ($comments as $comment) : ?>
< ?php if (get_comment_type() !="" "comment"){ ?>
<li id="comment-< ?php comment_ID() ?>" class="< ?php echo $oddcomment; ?> smaller">
<cite>< ?php comment_author_link() ?></cite>
< ?php if ($comment->comment_approved == '0') : ?>
Your comment is awaiting moderation.
< ?php endif; ?>
<p class="commentmetadata">< ?php comment_date('f js, y') ?> at < ?php comment_time() ?> < ?php edit_comment_link('e','',''); ?></p>
</li>
< ?php /* changes every other comment to a different class */
if ('alt' ="=" $oddcomment) $oddcomment ="" '';
else $oddcomment ="" 'alt';
?>
< ?php } ?>
< ?php endforeach; /* end for each comment */ ?>
<h3 id="comments">Comments</h3>
< ?php foreach ($comments as $comment) : ?>
< ?php if (get_comment_type() ="=" "comment"){ ?>
<li id="comment-< ?php comment_ID() ?>" class="< ?php echo $oddcomment; ?>">
<cite>< ?php comment_author_link() ?></cite>
< ?php if ($comment->comment_approved == '0') : ?>
Your comment is awaiting moderation.
< ?php endif; ?>
<p class="commentmetadata">< ?php comment_date('f js, y') ?> at < ?php comment_time() ?> < ?php edit_comment_link('e','',''); ?></p>
< ?php comment_text() ?>

< ?php /* changes every other comment to a different class */
if ('alt' ="=" $oddcomment) $oddcomment ="" '';
else $oddcomment ="" 'alt';
?>
< ?php } ?>
< ?php endforeach; /* end for each comment */ ?>
[Source: cre8d-design.com]