Viewing 1 replies (of 1 total)
  • Something like this should work. Of course, there might be a way to do this with less code:

    global $wpdb, $table_prefix;
    $order = 'user_nicename';
    $user_ids = $wpdb->get_col("SELECT ID FROM $wpdb->users ORDER BY $order");
    
    foreach($user_ids as $user_id) :
    	$user = get_userdata($user_id);
    	$level = $table_prefix . 'user_level';
    	$user->user_level = $user->$level;
    	if($user->user_level > 0) $all_authors[$user_id] = $user->display_name;
    endforeach;
    
    foreach($all_authors as $key => $value) :
    	$author_id = op_author_name_id($key);
    	query_posts("author=$author_id&showposts=1");
    	if(have_posts()) :
    		while(have_posts()) :
    			the_post();
    			the_title();
    			// Add other post stuff
    		endwhile;
    	endif;
    endforeach;
Viewing 1 replies (of 1 total)
  • The topic ‘The last Post of each author’ is closed to new replies.