我有一个自定义的帖子类型,在我的函数中设置了以下内容。php。问题是,即使在我指定了\'supports\' => array(\'title\',\'editor\',\'thumbnail\'),
. 我有什么遗漏吗?
add_theme_support( \'post-thumbnails\', array( \'post\' ) );
// Register Talents
add_action(\'init\', \'register_talents\');
function register_talents() {
$labels = array(
\'name\' => _x(\'Talents\', \'post type general name\'),
\'singular_name\' => _x(\'Talent\', \'post type singular name\'),
\'add_new\' => _x(\'Add New\', \'talent item\'),
\'add_new_item\' => __(\'Add New Talent\'),
\'edit_item\' => __(\'Edit Talent\'),
\'new_item\' => __(\'New Talent\'),
\'view_item\' => __(\'View Talent\'),
\'search_items\' => __(\'Search Talents\'),
\'not_found\' => __(\'Nothing found\'),
\'not_found_in_trash\' => __(\'Nothing found in Trash\'),
\'parent_item_colon\' => \'\'
);
$args = array(
\'labels\' => $labels,
\'public\' => true,
\'publicly_queryable\' => true,
\'show_ui\' => true,
\'query_var\' => true,
\'rewrite\' => true,
\'capability_type\' => \'post\',
\'hierarchical\' => false,
\'menu_position\' => null,
\'menu_icon\' => get_stylesheet_directory_uri() . \'/images/menu-talents.png\',
\'supports\' => array(\'title\',\'editor\',\'thumbnail\'),
\'has_archive\' => true
);
register_post_type( \'talents\' , $args );
}