Title: Count comments for each post
Last modified: August 18, 2016

---

# Count comments for each post

 *  [oceanbeat](https://wordpress.org/support/users/honeyjazz/)
 * (@honeyjazz)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/count-comments-for-each-post/)
 * I want to count and display the comments for every single entry.
    I tried it 
   with comment_ID() but that seems to count ALL comments in my blog. (Example: 
   [http://www.honeyjazz.net/blog/?p=5#comments](http://www.honeyjazz.net/blog/?p=5#comments)).
 * Is there a way to modify the template to let the comments be counted for single
   posts?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/count-comments-for-each-post/#post-200316)
 * I’m a little confused by your request, but I assume from the link you provided
   you’re just trying to display ascending numbers beside each comment.
 * The simplest method is to count off comments with your own variable, and use 
   that to display the #. In commments.php (of your theme — if it doesn’t have one,
   it will use the one for the default theme), look for this bit of code:
 * `<?php foreach ($comments as $comment) : ?>`
 * Just after the foreach, insert your variable with an increment operator:
 * `<?php foreach ($comments as $comment) : $comment_count++; ?>`
 * Then where you want your number to display:
 * `<?php echo $comment_count; ?>`
 *  Thread Starter [oceanbeat](https://wordpress.org/support/users/honeyjazz/)
 * (@honeyjazz)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/count-comments-for-each-post/#post-200319)
 * YESSS! It works.
    That’s exactly what i wanted! 🙂 I dind’t mean to confuse you
   but my English is not the best when it come sto technical terms. :/
 * Thanks a lot!!
 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/count-comments-for-each-post/#post-200321)
 * Don’t sweat over the tech language. I hate not fully understanding the question
   being asked, but I’m glad I assumed correct. `:)`
 *  Thread Starter [oceanbeat](https://wordpress.org/support/users/honeyjazz/)
 * (@honeyjazz)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/count-comments-for-each-post/#post-200326)
 * Me too 😉

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Count comments for each post’ is closed to new replies.

## Tags

 * [count](https://wordpress.org/support/topic-tag/count/)
 * [id](https://wordpress.org/support/topic-tag/id/)

 * 4 replies
 * 2 participants
 * Last reply from: [oceanbeat](https://wordpress.org/support/users/honeyjazz/)
 * Last activity: [21 years, 1 month ago](https://wordpress.org/support/topic/count-comments-for-each-post/#post-200326)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
