Title: get_comments_number help
Last modified: August 20, 2016

---

# get_comments_number help

 *  [Floyd3](https://wordpress.org/support/users/floyd3/)
 * (@floyd3)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/get_comments_number-help/)
 * I’d like to add another column to the page [here](http://www.pinkfloydtabs.com/guitar-tabs)
   called “Comments” (next to “Title, Rating”, “Views” and “Notes”) and then next
   to each song, it will say “0” or “1” or however many comments are on that tab
   page/wordpress post.
 * I found a wordpress function called “get_comments_number” that I think will do
   this, but I can’t get it to work.
 * Here is the code I tried, but it didn’t work:
 * <?php $commentscount = get_comments_number(278); echo $commentscount; ?>
 * With “278” being an example of one of the posts’ ID…
 * Is that not the right code to use? Can anyone point me in the right direction?
 * _[closed as duplicate – continue with the original topic [http://wordpress.org/support/topic/display-comment-count-next-to-posts?replies=2](http://wordpress.org/support/topic/display-comment-count-next-to-posts?replies=2)]_

The topic ‘get_comments_number help’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [Floyd3](https://wordpress.org/support/users/floyd3/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/get_comments_number-help/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
