Viewing 1 replies (of 1 total)
  • <?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.