I added a new article in my WordPress blog. In this article I included a link to one of my previous articles in the same blog. That article then informed me that I had a new comment. The comment was actually the link to it from my new entry. I went ahead and approved it and now that article says "one comment" underneath, but theres no comment there.

I am pretty new to having a WP blog, so I don't know if its a WP bug, a feature, or something I did wrong.

  • By the way: what Theme are you using? Jun 10 '11 at 14:37
  • @Chip cleanr by WPShoppe. My blog is here: programming-perils.com
    – JD Isaacks
    Jun 10 '11 at 14:46
  • I just updated my answer, with information specific to your Theme. Jun 10 '11 at 14:55

What it notified was actually not a comment but a Pingback. Often themes list both comments and pingbacks/trackbacks in the same spot, but you could cutomize that to have both a comments section and a pingback/trackback section.

  • Chip Bennet is right, it's a Pinkback, not a trackback, though they are almost similar.
    – mike23
    Jun 10 '11 at 13:39

That "link to your article" is a pingback, and is a valid comment type in WordPress.

There are two issues:

  1. Apparently, your Theme isn't configured to display pingbacks/trackbacks in the comment list
  2. The WordPress function get_comments_number() counts all comments, rather than just comment-type comments. You can filter it, if you want, so that it returns just the number of comments, rather than the total number of comments and pings.

Use something like the following (in your functions.php file):

 * Filter 'get_comments_number'
 * Filter 'get_comments_number' to display correct 
 * number of comments (count only comments, not 
 * trackbacks/pingbacks)
 * @link    http://www.wpbeginner.com/wp-tutorials/display-the-most-accurate-comment-count-in-wordpress/ WPBeginner
function mytheme_comment_count( $count ) {  
    if ( ! is_admin() ) {
        global $id;
        $comments_by_type = &separate_comments(get_comments('status=approve&post_id=' . $id));
        return count($comments_by_type['comment']);
    } else {
        return $count;
add_filter('get_comments_number', 'mytheme_comment_count', 0);

Then get_comments_number() will return just the number of comments.


Your Theme (which, by the way, hasn't been updated in the Repository in almost two years) is designed only to output comment-type comments. See here, in comments.php:

<ol class="commentlist">
    <?php wp_list_comments('type=comment&callback=cleanr_theme_comment'); ?>

You'll either need to modify the code, or switch to a Theme that supports listing trackbacks/pingbacks.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.