Support » Plugins » List Authors by most recent posts?

  • I’d like to list the authors in sidebar and have them sorted by the most recent posters.

    I currently use the following code to list the authors as I wanted their avatars, name, and link to their website also.

    <div class="bottombar"><h2 class="widgettitle">Contributors:</h2>
    			$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);
    						<a href="/home/authors/<?php echo $user->user_nicename; ?>" alt="<?php echo $user->nickname; ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/authors/<?php echo $user->last_name; ?>.jpg" alt="<?php echo $user->nickname; ?>" border="1" /></a>
    						<?php echo '<a href="' . $user->user_url . '">' . $user->display_name . '</a>'; ?><br />
    						<?php echo '<a href="' . $user->user_url . '">View Website</a>'; ?><br />
    						<a href="/home/authors/<?php echo $user->user_nicename; ?>" alt="<?php echo $user->nickname; ?>">Profile</a>
    		<?php	endforeach;
    			// end of authors' profile 'loop'

    Any help would be much appreciated

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘List Authors by most recent posts?’ is closed to new replies.