Title: Counting Comments
Last modified: August 18, 2016

---

# Counting Comments

 *  [swooper](https://wordpress.org/support/users/swooper/)
 * (@swooper)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/counting-comments/)
 * Does anyone know how to count comments and display the number before the actual
   comment begins? I do not want to use an ordered list. I like using definition
   lists.
 * thanks in advance.

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

 *  [skippy](https://wordpress.org/support/users/skippy/)
 * (@skippy)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/counting-comments/#post-215908)
 * [comments_number()](http://codex.wordpress.org/Template_Tags/comments_number):
   `
   <?php comments_number(__('0'),__('1'),__('%')) ?>`
 *  [techwench](https://wordpress.org/support/users/techwench/)
 * (@techwench)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/counting-comments/#post-215923)
 * Add this at the top of your comments.php (on a line just after `return; endif;`)
 * > `$commentcount=1;`
 * Then, you can use this anywhere in the foreach loop where it outputs the comments:
 * > `<?php echo $commentcount++; ?>`
 *  Thread Starter [swooper](https://wordpress.org/support/users/swooper/)
 * (@swooper)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/counting-comments/#post-216182)
 * thx [@ll](https://wordpress.org/support/users/ll/) especially techwench : )

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

The topic ‘Counting Comments’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [swooper](https://wordpress.org/support/users/swooper/)
 * Last activity: [20 years, 11 months ago](https://wordpress.org/support/topic/counting-comments/#post-216182)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
