comments WHERE comment_approved = '1'"; if (!$all_posts) $request .= " AND comment_post_ID=$id"; echo $wpdb->get_var($request); } function nc_blog($all_posts = true) { global $wpdb, $id; $request = "SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'"; if (!$all_posts) $request .= " AND comment_post_ID=$id"; echo $wpdb->get_var($request); } ?>