• I’m posting this here becuase I wasn’t able to post on the WordPress MU forums and kept getting an error.

    I’m using this code in my sidebar on a regular wordpress to list authors:

    <h2>Link list of authors:</h2>
    <ul>
        <?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);
        ?>
        <li><?php echo '<a href="' . $user->user_url . '">' . $user->display_name . '</a>'; ?><br /></li>
        <?php
        endforeach; // end of authors' profile 'loop'
        ?>
    </ul>

    but on a WordPress MU theme it lists all blogs users..

    How do I restrict it to use the current blogs authors/contributors?

    An example of what I’m trying to do can be seen at myfhablog.com where we’ve got a list of authors with gravatars that are randomized.

    Thanks in advance to those that help me shed some light on my poor php/sql skills.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘List Authors in Sidebar’ is closed to new replies.