I am using this code for listing out all authors on the site in my sidebar. It works, except I also need to pull in their Gravatar image. It's working in a loop on the homepage with this
<?php echo get_avatar( get_the_author_email(), '80' ); ?>
but is there a way I can add it to this list as well? Also.. I can't figure out a way to exclude the "Admin" account using this code, is that possible?
<?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) : $user = get_userdata($user_id); ?> <li><?php echo '<a href="' . $user->user_url . '">' . $user->display_name . '</a>'; ?><br /></li> <?php endforeach; ?>