这是分页的成员列表
<?php
$total = "SELECT ID, user_nicename from $wpdb->users ORDER BY user_nicename DESC";
$totalposts = $wpdb->get_results($total, OBJECT);
$ppp = intval(get_query_var(\'posts_per_page\'));
$wp_query->found_posts = count($totalposts);
$wp_query->max_num_pages = ceil($wp_query->found_posts / $ppp);
$on_page = intval(get_query_var(\'paged\'));
if($on_page == 0){ $on_page = 1; }
$offset = ($on_page-1) * $ppp;
$wp_query->request = "SELECT ID, user_nicename from $wpdb->users ORDER BY user_nicename DESC LIMIT $ppp OFFSET $offset";
$pageposts = $wpdb->get_results($wp_query->request, OBJECT);
?>
<?php if ($pageposts):
shuffle($pageposts);
array_rand($pageposts); ?>
<?php foreach ($pageposts as $author):
// Get user data
$curauth = get_userdata($author->ID);
// Get link to author page
$user_link = get_author_posts_url($curauth->ID);
// Set default avatar (values = default, wavatar, identicon, monsterid)
$avatar = \'wavatar\';
?>
<?php setup_postdata($post); ?>
如果我可以包括阿凡达,我想我也可以显示帖子数和评论数。