<?php
$users = $wpdb->get_var("SELECT COUNT(ID) FROM $wpdb->users");
echo '(', count( get_users( array( 'role' => 'author' ) ) ); echo ')'
?>
I need to know what is my best option for displaying the total number of authors who have at least posted and/or published something on my blog.
Currently the code is counting all the authors even if they haven't posted anything. Please let me know if there is a simple solution to this. I have looked throughout the wordpress codex and have not found a solution to this yet.