This is the code that I\'ve got. It gives a list of the categories a given author has published in. However, I would very much like to have a number next to the category nam
I usually use this plugin ( http://wordpress.org/plugins/author-profiles/ ) to display in the sidebar. And I guess this code will help any one
base_prefix;
$table_users.="users";
$table_posts.=$wpdb->base_prefix;
$table_posts.="posts";
$fetch_authordata="SELECT count(p.post_author) as post1,c.id, c.user_login, c.display_name,c.user_nicename, c.user_email, c.user_url, c.user_registered FROM {$table_users} as c , {$table_posts} as p {$where} and p.post_type = 'post' AND p.post_status = 'publish' and c.id=p.post_author GROUP BY p.post_author order by post1 DESC limit {$author_numbers} ";
$dispaly_authordata = (array) $wpdb->get_results("{$fetch_authordata}", object);
foreach ( $dispaly_authordata as $author ) {
$user = get_userdata($author->id);
echo 'Display Name: '.$user->display_name;
echo 'Post Count: '.$post_count = get_usernumposts($user->ID);
}
?>