Hey everybody. I have a template that I made show all of the authors on my site, unfortunately, I only want to show the current authors that write for the site (22 people) not every single person that has ever written an article (50+ people).
Below is the query I’m using in my template and was wondering if there was any way I could exclude these authors that I don’t want to show.
$authors = $wpdb->get_results('SELECT DISTINCT post_author FROM '.$wpdb->posts.' INNER JOIN '.$wpdb->users.' ON '.$wpdb->posts.'.post_author = '.$wpdb->users.'.ID ORDER BY '.$wpdb->users.'.display_name ASC');
foreach($authors as $author):
Thanks in advance for any help that you guys have, I very much appreciate it.