Most of wordpress default theme post or page will have comments and trackbacks in the same list. Sometime we can never differentiate between those two. Simply to make them more organize, there is a way to separate between comments and trackbacks. In order for commenters to have a clear picture of what is comment and what is not, prepare your favorite editor and here we go.

-
Step 1:
Simply just open your comments.php file using your favorite editor (eg: Dreamweaver, Notepad++ or any other editor that we assume you already know) and locate this line of code.
<?php foreach ($comments as $comment) : ?>
Paste this code below after the code above.
<?php $comment_type = get_comment_type(); ?>
<?php if($comment_type == 'comment') { ?>
-
Step 2:
Then look again for this line of code.
<?php endforeach; /* end for each comment */ ?>
And paste this code below before the code above.
<?php } else { $trackback = true; } /* End of is_comment statement */ ?>
-
Step 3:
Next look for this line of code.
<?php else : // this is displayed if there are no comments so far ?>
And paste this code below before the code above.
<?php if ($trackback == true) { ?>
<h3>Trackbacks</h3>
<ol>
<?php foreach ($comments as $comment) : ?>
<?php $comment_type = get_comment_type(); ?>
<?php if($comment_type != 'comment') { ?>
<li><?php comment_author_link() ?></li>
<?php } ?>
<?php endforeach; ?>
</ol>
<?php } ?>
-
Next:
It is already set. Save it and you will notice that trackbacks will appear underneath the comments. Simply with CSS you may change the order or make it appear side by side. It depends on you. Enjoy!

