Viewing 1 replies (of 1 total)
  • I use something like this:

    global $coauthors_plus;
    if (isset($coauthors_plus)) {
    	$curauth = $coauthors_plus->get_coauthor_by( 'user_nicename', $author_name );
    } else {
       	if(isset($_GET['author_name'])) :
          		$curauth = get_userdatabylogin($author_name);
          	else :
          		$curauth = get_userdata(intval($author));
      	endif;
    }
    
    echo $curauth->display_na
    
    if (isset($coauthors_plus)) {
       echo get_the_post_thumbnail($curauth->ID,array(90,90) );
    } else if(function_exists('get_avatar')) {
       echo get_avatar( $curauth->user_email, $size = '120' );
    } 
    
    if($curauth->description !="")
       echo $curauth->description;
    }
    
    if (have_posts()) : while (have_posts()) : the_post();
    	$format = get_post_format();
    	get_template_part( 'includes/post-formats/'.$format );
    	if($format == '')
    		get_template_part( 'includes/post-formats/standard' );
    	 endwhile; else:
    __('No post yet.', 'theme1965');
Viewing 1 replies (of 1 total)
  • The topic ‘List posts of a co-author in author.php’ is closed to new replies.