Support » Fixing WordPress » Total number of comments of the all posts in one category

  • csseur3

    (@csseur3)


    Hello,

    in a loop, i want to show the total number of comments of the posts of the one specific category, how to do that?

    i just know the <?php comments_popup_link() ?> to show the total number of comments of a one post.

    bye

Viewing 2 replies - 1 through 2 (of 2 total)
  • csseur3

    (@csseur3)

    Re,

    i have this:

    function mdv_comment_count() {
    
        global $wpdb;
    
    	$request = "SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'";
    
        echo $wpdb->get_var($request);
    
    }

    but the function is the total number of comments in all category.. hum, little help please =p

    csseur3

    (@csseur3)

    up =p

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Total number of comments of the all posts in one category’ is closed to new replies.