I want to show current user’s phone number on his profile page. I have used
<?php global $current_user;
get_currentuserinfo();
echo $current_user->user_login;
echo $current_user->user_email;
echo $current_user->user_level;
echo $current_user->user_first-name;
echo $current_user->user_last-name ;
echo current_user->display_name;
echo $current_user->ID;
?>
to get information of user. but when I using
echo $current_user->user_phone;
I don’t get the phone number.
How can I get user’s phone number?
Try this
I get the phone number, If anyone need then use
also get other fields data just get_user_meta( $user_id, ‘field-name’, true );