How To Fetch All User Data Form User In Wp

<?php
$users = get_users( array( 'fields' => array( 'ID' ) ) );
 foreach($users as $user){
  echo"<pre>";
 print_r(get_user_meta ( $user->ID));
  echo"</pre>;
 }
add_shortcode('userget','getuser');
?>

Leave a Comment