Aug 12

Displaying pingbacks to your post is a good thing because your readers often will find interesting and value added information in the post that links to your post. What I don’t like is when pingbacks get mixed with the comments to your post, I find that messy. Therefore I decided to separate the pingbacks from my comments and in this post I will show you how I did it.

I guess that some WordPress themes already have this functionality, but mine did not so I decided to implement this by my self.

First I changed the post summary heading to count comments and pingbacks separately. Originally it counted both comments and pingbacks and displayed it as “x comments”. By implementing the following code “x comments and x pingbacks” will be displayed.
Insert the following code in the have_posts() loop in index.php

<div class="post" id="post-<?php the_ID(); ?>">
<div class="date"><span><?php the_time(‘M’) ?>
</span> <?php the_time(‘d’) ?></div>

<div class="title">
<h2 class="posttitle">
<a href="<?php the_permalink() ?>" rel="bookmark"
title="Permanent Link to <?php the_title(); ?>">
<?php the_title(); ?></a></h2>

Continue reading »

Tagged with:
Subscribe to my feeds Follow me on Twitter