在主题函数中插入此代码。php并使用此快捷码[users\\u count\\u bro]显示所需位置
function total_count_bro() {
$out = \'\';
$user_count_data = count_users();
$avail_roles = $user_count_data[\'avail_roles\'];
foreach ( $avail_roles as $role_key => $role_count ) {
$out .= $role_key.\':\'.$role_count.\'<br/>\';
}
return $out;
}
add_shortcode( \'users_count_bro\', \'total_count_bro\' );