I want to show avatar from the post author. I use Ultimate Members and want to show the avatars that are defined via UM.
<?php
global $post;
$url = get_avatar_url( $post, array( 'size' => 48 ));
$img = '<img alt="" src="'. $url .'">';
echo $img;
?>
But this code shows the gravatars or default avatar. How can I get the avatars from Ultimate Member?
I want to show avatar from the post author. I use Ultimate Members and want to show the avatars that are defined via UM.
<?php
global $post;
$url = get_avatar_url( $post, array( 'size' => 48 ));
$img = '<img alt="" src="'. $url .'">';
echo $img;
?>
But this code shows the gravatars or default avatar. How can I get the avatars from Ultimate Member?
To get user's avatars of the UM plugin, you have to do this :
// Returns a given user's avatar
um_get_user_avatar_url( $user_id = '', $size = '96' )
Moderator has delete this answer, but this code work:
get_avatar( get_the_author_meta( 'user_email' ), 48 );