At the moment I am doing the following to get a list of all authors:
$authors = wp_list_authors('html=0&style=none&echo=0&exclude_admin=1&optioncount=0&show_fullname=1&hide_empty=1&orderby=name&order=ASC');
$authors_array = explode(',', $authors);
for ($j = 0; $j < count($authors_array); $j++)
{
echo '<li id="">'.$authors_array[$j].'</li>';
}
How can I also get the user’s id?
I have looked everywhere and I can’t think of a way to get all authors and another bit of meta data.
Another way I found was to do the following (swear I couldn’t find anything like this earlier):
You can either override the function in functions.php or create a new function based on the original. Looking at the code it’s easy enough to just include the $author_id in the foreach loop.
Code for original is here
Try this and make sure you add the new parameter (includeauthorid) into the function call…
new function – ps I wouldn’t recommend changing the original. Just put this in functions.php.
}