Title: Adding a comments count to my posts
Last modified: January 26, 2017

---

# Adding a comments count to my posts

 *  [phl43](https://wordpress.org/support/users/phl43/)
 * (@phl43)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/adding-a-comments-count-to-my-posts/)
 * Hi everyone,
 * I recently created a blog with WordPress ([http://necpluribusimpar.net](http://necpluribusimpar.net))
   and I need some help. I’m using the Retina theme, which I like a lot, but it 
   doesn’t have a comments count on the front page and I would like to have one.
   Can someone tell me how I can add one, so that when someone goes on the front
   page of my blog, he can see the number of comments on each post as is the case
   on most blogs? Thanks in advance for your help!
 * Best,
    Philippe

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

 *  [Patrick](https://wordpress.org/support/users/wppatrickk/)
 * (@wppatrickk)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/adding-a-comments-count-to-my-posts/#post-8700205)
 * Something like this.
 * `<?php comments_number( '0 Comments', '1 Comment', '% Comments' ); ?>`
 * [https://codex.wordpress.org/Function_Reference/comments_number](https://codex.wordpress.org/Function_Reference/comments_number)
    -  This reply was modified 9 years, 4 months ago by [Patrick](https://wordpress.org/support/users/wppatrickk/).
 *  Thread Starter [phl43](https://wordpress.org/support/users/phl43/)
 * (@phl43)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/adding-a-comments-count-to-my-posts/#post-8700275)
 * Thanks! I did find that function on WordPress’s website, but I’m wondering where
   to put this code to modify the Retina theme I’m using in a clean way.
 *  [Patrick](https://wordpress.org/support/users/wppatrickk/)
 * (@wppatrickk)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/adding-a-comments-count-to-my-posts/#post-8700281)
 * In your theme files.
 * index.php – if you want it on the home page
    single.php – if you want it on the
   single post page
 * Creating a child theme would be better.
    [https://codex.wordpress.org/Child_Themes](https://codex.wordpress.org/Child_Themes)
 * They both might be using a different template file to display the loop so it 
   really depends on the theme. You can ask the Retina theme support about this.
 * [https://wordpress.org/support/theme/retina](https://wordpress.org/support/theme/retina)
    -  This reply was modified 9 years, 4 months ago by [Patrick](https://wordpress.org/support/users/wppatrickk/).
 *  Thread Starter [phl43](https://wordpress.org/support/users/phl43/)
 * (@phl43)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/adding-a-comments-count-to-my-posts/#post-8700291)
 * Thanks a lot! I had a look at the code of the theme and it seems like I just 
   need to put the code you gave me above in the files named content.php and content-
   single.php. (I guess that’s just how the guys who create the Retina theme named
   index.php and single.php.)
 * But am I correct that this will only display the number of comments for each 
   post, not add a link so that the user is taken to the comments by clicking on
   the number? If so, how do I add a link in a clean fashion (I don’t want it to
   be a hack), so that one goes to the comments when one clicks on the number?
 *  [Patrick](https://wordpress.org/support/users/wppatrickk/)
 * (@wppatrickk)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/adding-a-comments-count-to-my-posts/#post-8700310)
 * Too add a link to the post’s comments, use comments_link()
 * [https://codex.wordpress.org/Function_Reference/comments_link](https://codex.wordpress.org/Function_Reference/comments_link)
    -  This reply was modified 9 years, 4 months ago by [Patrick](https://wordpress.org/support/users/wppatrickk/).

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

The topic ‘Adding a comments count to my posts’ is closed to new replies.

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 5 replies
 * 2 participants
 * Last reply from: [Patrick](https://wordpress.org/support/users/wppatrickk/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/adding-a-comments-count-to-my-posts/#post-8700310)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
