Hi there
Try to change this function in functions.php (in the include-directory):
function get_usernumposts($userid) {
global $wpdb;
return $wpdb->get_var(“SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = ‘$userid'”);
}
to something like this: (this will count the number of published posts)
function get_usernumposts($userid) {
global $wpdb;
return $wpdb->get_var(“SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = ‘$userid’ AND post_status = ‘publish'”);
}
or (to just count each non-draft post):
function get_usernumposts($userid) {
global $wpdb;
return $wpdb->get_var(“SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = ‘$userid’ AND post_status <> ‘draft'”);
}