Support » Fixing WordPress » List all authors

  • This code snippet will list all of the authors in your wordpress:

    $theauthors = $wpdb->get_results("SELECT * FROM $wpdb->users ORDER BY display_name");
    foreach ($theauthors as $theauthor) {
    echo "<a href=\"/archives/author/$theauthor->user_nicename\">";
    echo "$theauthor->display_name</a>";
    echo "<br/>";

    Maybe someone out there knows a better way, but this is a start.

    [sig moderated]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘List all authors’ is closed to new replies.