I want to have the authors listed like usual from wp_list_authors()
but I know there are a couple of ones I would like to exclude from the list as well. Is there a way to do that?
Thanks
4 Answers
wp_list_authors()
now does have an exclude
parameter. So you can exclude the authors you want by their user ID.
It accepts:
An array, comma-, or space-separated list of author IDs to include. Default empty.
Examples:
// exclude just the author with the ID 4
wp_list_authors([ 'exclude' => 4 ]);
// exclude the authors with the IDs 4 and 7
wp_list_authors([ 'exclude' => [ 4, 7 ] ]);
// or
wp_list_authors([ 'exclude' => '4, 7' ]);