By default, WordPress combines both comments and trackbacks together. Separating both can make the things look more organized.

Step 1: Find the below code in the comments.php file.

<?php foreach ($comments as $comment) : ?>

Paste the below code after it.

<?php $comment_type = get_comment_type(); ?>

<?php if($comment_type == ‘comment’) { ?>

Step 2: Then, look for the below code

<?php endforeach; /* end for each comment */ ?>

Paste the below code before it

<?php } else { $trackback = true; } /* End of is_comment statement */ ?>

Step 3: Then, look for the following code

<?php else : // this is displayed if there are no comments so far ?>

Paste the below code before it

<?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 } ?>

Please follow and like us: