Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Forum: Hacks
    In reply to: Getting multiple user_id …
    Thread Starter vudujoose

    (@vudujoose)

    Topic solved figured it out, thanks for anyone who was thinking of answering =P

    For purposes of learning I will show how I did it though…

    <?php
    $szSort = "user_nicename";
    $aUsersID = $wpdb->get_col( $wpdb->prepare(
    "SELECT $wpdb->users.ID FROM $wpdb->users ORDER BY %s ASC", $szSort ));
    foreach ( $aUsersID as $iUserID ) :
    $key = 'class';
    $single = true;
    $user = get_userdata( $iUserID, $key );
    echo '
    <li>' . ucwords( strtolower( $user->$key ) ) . '</li>
    ';
    endforeach;
    ?>
    Thread Starter vudujoose

    (@vudujoose)

    I’m sorry I meant to update this, I figured it out about 20 minutes after I asked.

    The page.php is very useful info as well though thank you.

    We can mark as resolved…

Viewing 2 replies - 1 through 2 (of 2 total)