Ready to get started?Download WordPress


List all authors (2 posts)

  1. westondeboer
    Posted 6 years ago #

    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]

  2. Doodlebee
    Posted 6 years ago #

    1) Section E of this link - you shouldn't post a signature. Not allowed. ;)

    2) ...or you could just use <?php wp_list_authors(); ?>, and/or the author templates system.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.