Wordpress自定义用户显示页面

Wordpress自定义用户显示页面,wordpress,Wordpress,首先,我想先介绍一下今天早上正在工作的页面,我让页面打开,然后返回到根本没有显示的用户信息 此页面是自定义的书面作者显示页面。任何人谁是该网站的贡献者列出了这里的个人简历,Avitar和昵称,有人请告诉我,我缺少什么,因为我看不到什么已经被删除 <?php /* Template Name: Display Authors */ // Get all users order by amount of posts $allUsers = get_users('orderby=post_co

首先,我想先介绍一下今天早上正在工作的页面,我让页面打开,然后返回到根本没有显示的用户信息

此页面是自定义的书面作者显示页面。任何人谁是该网站的贡献者列出了这里的个人简历,Avitar和昵称,有人请告诉我,我缺少什么,因为我看不到什么已经被删除

<?php
/*
Template Name: Display Authors
*/

// Get all users order by amount of posts
$allUsers = get_users('orderby=post_count&order=DESC');

$users = array();

// Remove subscribers from the list as they won't write any articles 
foreach($allUsers as $currentUser)
{
if(in_array( 'contributor', $currentUser->roles ))
{
$users[] = $currentUser;
} 
}
?>

<?php get_header(); ?>
<section class="content-area" role="main">
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="authors">
<?php foreach($users as $user) { ?>
<div class="page-author author-<?php echo ($curauth->ID & 1 ? 'odd' : 'even'); ?>">
        <div class="author-avatar">
        <?php echo get_avatar( $curauth->user_email, '200' ); ?>
    </div>
        <div class="author-info">
            <h2 class="author-name"><?php echo $curauth->first_name . ' ' .            $curauth->last_name; ?></h2>
            <h3 class="author-username"><?php echo $curauth->nickname; ?></h3>
        </div>
        <div class="clearfix"></div>
            <p class="author-descrption"><?php echo   get_user_meta($curauth->ID,'description', true); ?></p>
</div>
<?php
}
 ?>
 </div>
</section>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
更新:

因此,我的代码中有一个更新,但仍然没有运气,页面上的所有用户信息仍然是空的。所以它没有显示名字,昵称,简历…什么都没有

<?php
/*
Template Name: Display Authors
*/

// Get all users order by amount of posts
$allUsers = get_users('orderby=post_count&order=DESC');

$users = array();
// Remove subscribers from the list as they won't write any articles
foreach($allUsers as $currentUser)
{
if(in_array( 'contributor', $currentUser->roles ))
{
$users[] = $currentUser;
}
}
?>
<?php get_header(); ?>
<section class="content-area" role="main">
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="authors">
<?php foreach($users as $user): ?>
<div class="page-author author-<?php echo ($curauth->ID & 1 ? 'odd' : 'even'); ?>">
        <div class="author-avatar">
            <?php echo get_avatar( $curauth->user_email, '200' ); ?>
    </div>
        <div class="author-info">
            <h2 class="author-name"><?php echo $curauth->first_name . ' ' .  $curauth->last_name; ?></h2>
            <h3 class="author-username"><?php echo $curauth->nickname; ?></h3>
        </div>
        <div class="clearfix"></div>
        <p class="author-descrption"><?php echo get_user_meta($curauth->ID, 'description', true); ?></p>
</div>
<?php endforeach; ?>    
</div>
</section>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

如果没有显示任何内容,则可能是php错误。尝试打开错误报告并发布显示的错误。我应该更清楚地说明,没有出现任何作者信息,css样式和页面的其余部分显示…@Meghandnnelly该页面重定向到wp-login.phpYes。很抱歉,我无法将链接从网络发送出去。我希望有人仍然可以帮助我上传一个屏幕截图-很抱歉,显然我的评分不够高,无法提交和图片。。。。