Title: Comment Count for Specific Post
Last modified: August 19, 2016

---

# Comment Count for Specific Post

 *  [Lung](https://wordpress.org/support/users/kutu/)
 * (@kutu)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/comment-count-for-specific-post/)
 * Below I’m calling the permalink for post 3770 and the title for post 3770 –
 * How can a specify the comment count for post 3770? and specify the excerpt for
   post 3770?
 *  <h2>” title=”<?php echo get_the_title(3770) ?> “>
    <?php echo get_the_title(
   3770) ?>
    <span class=”commentcount”> (<?php comments_popup_link(‘0’, ‘1’, ‘%’);?
   >)</span></h2>
    <?php the_excerpt(); ?>
 * Thanks

Viewing 1 replies (of 1 total)

 *  [mugsinc](https://wordpress.org/support/users/mugsinc/)
 * (@mugsinc)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/comment-count-for-specific-post/#post-1219067)
 * <?php
    global $wpdb; $postID = 56; $title = get_the_title(); $comments = $wpdb-
   >get_row(“SELECT comment_count as count FROM wp_posts WHERE ID = ‘$postID'”);
   $commentcount = $comments->count; echo $commentcount; ?>
 * try this worked for me, remember to change the post id to the one you want

Viewing 1 replies (of 1 total)

The topic ‘Comment Count for Specific Post’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [mugsinc](https://wordpress.org/support/users/mugsinc/)
 * Last activity: [16 years, 5 months ago](https://wordpress.org/support/topic/comment-count-for-specific-post/#post-1219067)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
