Hi, I'm trying to list users on different pages. They need to sort by last name, A-Z. The list should be limited to users of a specific category, say, contributors, or featured_artist (one of several custom roles I set up with the "user role editor" plugin).
I've tried a few different plugins, searched dozens of forums, but none seems to do everything I need. I'm guessing my code will look like:
global $wpdb;
$users = $wpdb->get_results("INSERT MYSQL VOODOO HERE");
foreach ($users as $userid) {
$avatar=get_avatar($userid);
$user = get_firstname($userid);
$author_posts_url = get_author_posts_url($user->ID);
echo '<a href="' . $author_posts_url . '">' . ' ' . $avatar. ' ' . $user->user_firstname . ' ' . $user->user_lastname . '</a>';
}
Bonus would be if I could get them to spill across 4 vertical columns. Bonus 2 is I design you a custom admin icon for the plugin of your choice if you can help me out!