Deprecated: Return type of HM\BackUpWordPress\CleanUpIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/charlott/ourfragileplanet.com/site/wp-content/plugins/backupwordpress/classes/class-path.php on line 455
Showing the Current User's Biography, Name, Avatar in Wordpress - Our Fragile Planet

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;
      get_currentuserinfo();
      echo $current_user->display_name . "\n";

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

Scroll to Top