Code below is to get current user ID.
$user_ID = get_current_user_id();
Code below is to get all user meta.
$user_meta = array_map( function( $a ){ return $a[0]; }, get_user_meta( $user_ID ) ); echo $user_meta[last_name]; echo $user_meta[description];
Output :
Development Lorem ipsum dolor sit amet, nunc arcu urna, id donec.
Sample array.
Array ( [first_name] => WordPress [last_name] => Development [nickname] => Admin [description] => Lorem ipsum dolor sit amet, nunc arcu urna, id donec. )
Leave a Reply