您可以创建custom template page 为此,请利用Wordpress本身提供的适当类:WP_User_Query
例如:
// Create the WP_User_Query object
$wp_user_query = new WP_User_Query(array (
\'role\' => \'Manager\',
\'order\' => \'ASC\',
\'orderby\' => \'display_name\'
));
// Get the results
$managers = $wp_user_query->get_results();
// Looping managers
if (!empty($managers)) {
echo \'<ul>\';
foreach ($managers as $manager)
{
// get all the user\'s data
$user_info = get_userdata($manager->ID);
//printing basic infos
echo \'<li>\';
echo get_avatar( get_the_author_meta( $manager->ID ), 96 );
echo $user_info->first_name;
echo $user_info->last_name;
echo \'</li>\';
}
echo \'</ul>\';
} else {
echo \'No managers found\';
}