您可以使用get_users().
$args = array(
\'fields\' => \'all_with_meta\',
);
$users = get_users( $args );
foreach( $users as $user ) {
// your display code here
var_dump( $user ); // so you can see what\'s in $user
}
all_with_meta 如果我正确阅读了Codex页面,将获得用户和所有相关元。
Update: 在测试代码之后,我发现\'number\' => -1 根本不返回任何内容,因此我将其从代码中删除。