根据wordpress用户ID调用该ID对应用户的个人信息


$args = array(
'include' => array( 1, 2 )
);

// wodepress.org
$user_query = new WP_User_Query( $args );

// User Loop wodepress.org
if ( ! empty( $user_query->results ) ) {
foreach ( $user_query->results as $user ) {
echo '

' . $user->display_name . '

';
echo get_avatar( $user->ID, 120);
}
} else {
echo 'No users found.';
}