Hi @sebnast
You can try adding the following code snippets to your Theme/Child-Theme’s functions.php file or use the Code Snippets plugin to run the code:
add_shortcode("um_display_avatar","um_070221_avatar_shortcode");
function um_070221_avatar_shortcode( $atts ) {
$atts = extract( shortcode_atts( array(
'user_id' => get_current_user_id(),
), $atts ) );
$image = get_usermeta( $user_id , "profile_photo", true);
return UM()->uploader()->get_upload_user_base_url( $user_id ) ."/" . $image;
}
Usage #1: [um_display_avatar] – Displays the currently logged-in user’s profile photo URL
Usage #2: [um_display_avatar user_id="35"] – Displays the profile photo URL of a specific user.
Regards,
Hey there!
This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.
Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. 🙂
Regards,