Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

share|improve this question
    
By the way: what Theme are you using? –  Chip Bennett 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. –  Chip Bennett Jun 10 '11 at 14:55

2 Answers 2

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.

share|improve this answer
    
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.

EDIT:

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'); ?>
</ol>

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

share|improve this answer
    
Thanks I will try this out. –  JD Isaacks Jun 10 '11 at 14:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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