Site icon Anthony Carbon

How to get the Buddypress user avatar inside or outside the Buddypress template?

Copy and paste the codes below to your custom template.

global $current_user;
echo get_avatar( $current_user->ID, 150, "https://www.anthonycarbon.com/wp-content/uploads/2016/05/logo.png" );

For more detailed information, please visit here https://codex.wordpress.org/Function_Reference/get_avatar.

Happy coding 🙂

Exit mobile version