WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] List authors in the sidebar along with link (4 posts)

  1. heliosphan1
    Member
    Posted 7 years ago #

    Is it possible to use the wp_list_authors to list multiple authors plus a web link after the name?

    Like such - First the name which links to their posts and then their website.

    Joe Smith [website]
    Jane Smith [website]
    Steve Jones [website]
    Alex Walters [website]

    Any ideas?

  2. MichaelH
    Member
    Posted 7 years ago #

    Author_Templates has some examples that should fit the bill.

  3. heliosphan1
    Member
    Posted 7 years ago #

    Thanks, but I've tried every variation for the last two days.

    i can generate names with the number of posts, link to RSS, etc. but can't seem to generate names WITH a url next to it...

    Any other ideas?

  4. heliosphan1
    Member
    Posted 7 years ago #

    I found a way: YAY!!

    <?php
    $order = 'user_nicename';
    $user_ids = $wpdb->get_col("SELECT ID FROM $wpdb->users ORDER BY $order"); // query users
    foreach($user_ids as $user_id) : // start authors' profile "loop"
    $user = get_userdata($user_id);
    ?>
    # <?php
    ?>
    <?php if($user->user_url) : ?>
    ID, "$user->user_nicename"); ?>"><?php echo $user->display_name; ?>
    <?php endif; ?> |
    
    <?php
    ?>
    <?php if($user->user_url) : ?>
    user_url; ?>">Bio
    
    <?php endif; ?>
    
    <?php endforeach; // end of authors' profile 'loop' ?>

Topic Closed

This topic has been closed to new replies.

About this Topic