为什么是wp_list_authors
当我有supports
是否启用选项?从我在其他地方读到的内容来看,我似乎涵盖了所有内容,但CPT的作者拒绝透露。我试图让默认的帖子和CPT作者显示在一个统一的列表中。有人能告诉我我做错了什么吗?
FUNCTIONS.PHP
// Registers a new post type
add_action( \'init\', \'message_init\' );
function message_init() {
$labels = array(
\'name\' => _x( \'Messages\', \'post type general name\', \'site\' ),
\'singular_name\' => _x( \'Message\', \'post type singular name\', \'site\' ),
\'menu_name\' => _x( \'Messages\', \'admin menu\', \'site\' ),
\'name_admin_bar\' => _x( \'Message\', \'add new on admin bar\', \'site\' ),
\'add_new\' => _x( \'Add New\', \'message\', \'site\' ),
\'add_new_item\' => __( \'Add New Message\', \'site\' ),
\'new_item\' => __( \'New Message\', \'site\' ),
\'edit_item\' => __( \'Edit Message\', \'site\' ),
\'view_item\' => __( \'View Message\', \'site\' ),
\'all_items\' => __( \'All Messages\', \'site\' ),
\'search_items\' => __( \'Search Messages\', \'site\' ),
\'parent_item_colon\' => __( \'Parent Messages:\', \'site\' ),
\'not_found\' => __( \'No messages found.\', \'site\' ),
\'not_found_in_trash\' => __( \'No messages found in Trash.\', \'site\' ),
);
$args = array(
\'labels\' => $labels,
\'description\' => __( \'Description.\', \'site\' ),
\'public\' => true,
\'publicly_queryable\' => true,
\'show_ui\' => true,
\'show_in_menu\' => true,
\'query_var\' => true,
\'rewrite\' => array( \'slug\' => \'connect/series/message\' ),
\'capability_type\' => \'post\',
\'has_archive\' => true,
\'hierarchical\' => false,
\'menu_position\' => null,
\'supports\' => array( \'title\', \'editor\', \'author\', \'thumbnail\', \'post-formats\' ),
\'taxonomies\' => array( \'category\' )
);
register_post_type( \'message\', $args );
}
PAGE WHERE AUTHORS ARE TO DISPLAY
<div class="authors_content">
<h5>Authors</h5>
<ul>
<?php $args = array(
\'orderby\' => \'post_count\',
\'order\' => \'DESC\',
\'number\' => 5,
\'exclude_admin\' => false,
\'show_fullname\' => false
);
wp_list_authors( $args ); ?>
<li><a href="#">View All</a></li>
</ul>
</div>
CPT Template DECLARATION
/*
Template Name: Message Template
Template Post Type: post, messages
*/