Get author information in WordPress while loop


while ( have_posts() ) : the_post();


//Avatar image

echo get_avatar( 32 );

//Author “Nick Name”

echo the_author_meta( ‘user_nicename’ , $author_id );

echo get_userdata($author_id)->nickname;

//Author “Display Name”

echo the_author_meta( ‘display_name’ , $author_id );

//Author “E-Mail address”

echo the_author_meta( ‘user_email’, $author_id );

//Author user loin

echo get_userdata($author_id)->user_login;



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s