Many thanks for that. I have implemented it but for some reason it shows posts that have been deleted as well on the count. So if a post has been deleted it still shows the author as well.
Any ideas?
Thanks
Ah actually I have found out why now. Draft documaents. Can they be hidden from the tag with some syntax?
Thanks
This was actually reported as a bug, and will be fixed in 1.5.1.
http://mosquito.wordpress.org/view.php?id=1010
In the mean time you can *repair* it with a one line modification to the source. Open wp-includes/functions.php in a text editor and around line 210 you’ll find the get_usernumposts()
function:
function get_usernumposts($userid)
A few lines down change the sql query being returned from this:
return $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = '$userid'");
to this:
return $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = '$userid' && post_status = 'publish'");