Showing the Current User’s Biography, Name, Avatar in WordPress

I really wanted to show the current users biography in a page template for wordpress and I was surprised how long it took me to figure out how to do it. This is the recipe that I got to work. I hope that it helps someone else too.

 $user_info = get_userdata($current_user->ID);
      echo $user_info-> user_description ;

Showing the avatar was easier to figure out:

       global $current_user;
       echo get_avatar( $current_user->ID, 200 );

In this 200 refers to the width of the image.

The name I did like this:

 global $current_user;
      echo $current_user->display_name . "\n";

Hope you find this useful – I know I’ll be back needing this again.

Related Posts