如何获取网站上的作者总数?
这显示了网站上用户的摘要,但我只想知道作者的数量。
<?php
$result = count_users();
echo \'There are \', $result[\'total_users\'], \' total users\';
foreach($result[\'avail_roles\'] as $role => $count)
echo \', \', $count, \' are \', $role, \'s\';
echo \'.\';
?>
https://codex.wordpress.org/Function_Reference/count_users