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

Fatal error: Uncaught wfWAFStorageFileException: Unable to save temporary file for atomic writing. in /home/charlott/ourfragileplanet.com/site/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php:34 Stack trace: #0 /home/charlott/ourfragileplanet.com/site/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php(658): wfWAFStorageFile::atomicFilePutContents('/home/charlott/...', '<?php exit('Acc...') #1 [internal function]: wfWAFStorageFile->saveConfig('livewaf') #2 {main} thrown in /home/charlott/ourfragileplanet.com/site/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php on line 34