将下代码加到你准备显示的 WordPress 主题位置:
<ul >
<?php $usernames = $wpdb->get_results("SELECT user_nicename, user_url FROM $wpdb->users ORDER BY ID DESC LIMIT 5");
foreach ($usernames as $username) {
echo '<li>'
.get_avatar($username->comment_author_email, 45).'<a
href="'.$username->user_url.'">'.$username->user_nicename."</a></li>";
}
?>
</ul>