Home / comment / Total number of comments
  • How to Total number of comments

    no thumbnail sorry: Total number of comments

    Adding this PHP code to your wordpress theme will display the total number of comments on your blog.

    ( click code to copy )

    wordpress snippet : PHP

    <>
    <?php
    $numcom = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'");
    if (0 < $numcom) $numcom = number_format($numcom);
    ?>
    

    ( WordPress codex functions, hooks, in this snippet. )

    wp,