Title: Please help me add comment count to plugin
Last modified: August 19, 2016

---

# Please help me add comment count to plugin

 *  [samueldiener](https://wordpress.org/support/users/samueldiener/)
 * (@samueldiener)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/add-comment-count-to-plugin/)
 * Thank you for your help in advance — I would try to figure this out myself but
   it could take a day, or a week.. So I figure why not let the experts help.
 * I use a plugin – wp-catlist that shows all posts in a category…. and it produces
   the output on “[http://www.samdiener.com/article-list/&#8221](http://www.samdiener.com/article-list/&#8221);
 * I would like to add the comment count to the plugin. So it produces:
 * Title Yadi Yadi Yada, (X comments)
 * The code in the plugin that produces the post title output is/are:
 *     ```
       foreach($catposts as $single):
       			$output .= '<li><a href="' . get_permalink($single->ID).'">' . $single->post_title . '</a>';
       			if($atts['date']=='yes'){
       				$output .=  ' - ' . get_the_time($atts['dateformat'], $single);//by Verex, great idea!
       			}
       			if($atts['author']=='yes'){
       				$lcp_userdata =
       ```
   
 * I am assuming that it is get_comment_count($single) or something, but I don’t
   know enough wp/php to add it to the code without killing it completely. Whoa 
   is me.
 * Thank you? and thoughts?
 * Sam Diener

The topic ‘Please help me add comment count to plugin’ is closed to new replies.

## Tags

 * [Comments](https://wordpress.org/support/topic-tag/comments/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * 0 replies
 * 1 participant
 * Last reply from: [samueldiener](https://wordpress.org/support/users/samueldiener/)
 * Last activity: [16 years, 3 months ago](https://wordpress.org/support/topic/add-comment-count-to-plugin/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
