Hello!
I am working on a author page that will list my authors along with some info on them. Tho code is partially working. The problem is now that i have 5 "users" and it recognizes that - but it adds the profile of the admin 5 times instead.
<?php
// Get the authors from the database ordered by user nicename
global $wpdb;
$query = "SELECT ID, user_nicename from $wpdb->users ORDER BY user_nicename";
$author_ids = $wpdb->get_results($query);
// Loop through each author
foreach($author_ids as $author) :
// Get user data
$curauth = get_userdata($author->ID);
// Get link to author page
$user_link = get_author_posts_url($curauth->ID);
// Set default avatar (values = default, wavatar, identicon, monsterid)
$avatar = 'wavatar';
?>
<?php wp_list_authors ?>
<small style="visibility:hidden; font-size:1px;">Line Break</small>
<?php echo get_avatar( get_the_author_email(), '50' ); ?>
<p><b><?php the_author_link(); ?></b> <small>(<?php the_author_posts(); ?> Articles)</small></p>
<p><?php the_author_description(); ?></p>
<?php endforeach; ?>
Any help would be greatly appreciated!!