If you want to get all user meta data by using id then use get_user_meta() function.

For example user id is 25. Use the following code for get all user meta data.

<?php
  $all_meta_for_user = get_user_meta( 25 );
  print_r( $all_meta_for_user );
?>

Results:

Array ( 
[first_name] => Array ( [0] => Tom ) 
[last_name] => Array ( [0] => Auger) 
[nickname] => Array ( [0] => tomauger ) 
[description] => etc.... )

Have any doubt, then comment here!

Leave a Reply

Your email address will not be published. Required fields are marked *