我定制了一个帖子类型“Dream”。代码如下:
//Add custom post type by Akash
add_action( \'init\', \'create_post_type\');
function create_post_type() {
register_post_type(
\'dream\',
array(
\'labels\' => array(
\'name\' => __( \'Dreams\' ),
\'singular_name\' => __( \'Dream\' )
),
\'taxonomies\' => array(\'category\', \'post_tag\'),
\'capability_type\' => \'post\',
\'map_meta_cap\' => true,
\'hierarchical\' => false,
\'rewrite\' => array(\'slug\' => \'Dreams\'),
\'query_var\' => false,
\'delete_with_user\' => true,
\'supports\' => array(
\'title\', \'editor\', \'author\', \'thumbnail\',
\'excerpt\', \'trackbacks\', \'custom-fields\',
\'comments\', \'revisions\', \'post-formats\'
),
\'public\' => true,
\'has_archive\' => true
)
);
}
当我尝试以管理员身份添加CPT“Dream”时,它会显示用于添加媒体的特色图像块,但当我尝试以作者身份执行相同操作时,不会显示特色图像块。如何解决此问题?