WordPress.org

Ready to get started?Download WordPress

Forums

List all authors (2 posts)

  1. westondeboer
    Member
    Posted 6 years ago #

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

    <?php
    $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
    Member
    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

Tags

No tags yet.