您是否通过add_post_type_support()
?
使用此格式:
<?php add_post_type_support( $post_type, $supports ) ?>
The
$supports
参数是一个数组,可以包含以下字符串:
“标题”编辑器(内容)\'post-formats\'添加post格式请注意,可以通过register_post_type()
调用,使用supports
参数数组键。请参阅以下缩写版本the Codex example:
<?php
add_action(\'init\', \'codex_custom_init\');
function codex_custom_init()
{
$labels = array();
$args = array(
\'labels\' => $labels,
\'public\' => true,
\'publicly_queryable\' => true,
\'show_ui\' => true,
\'show_in_menu\' => true,
\'query_var\' => true,
\'rewrite\' => true,
\'capability_type\' => \'post\',
\'has_archive\' => true,
\'hierarchical\' => false,
\'menu_position\' => null,
\'supports\' => array(\'title\',\'editor\',\'author\',\'thumbnail\',\'excerpt\',\'comments\')
);
register_post_type(\'book\',$args);
}
?>
EDIT
使用您自己的代码:
<?php
function create_post_type() {
register_post_type( \'intrigue_faculty\',
array(
\'labels\' => array(
\'name\' => __( \'Faculty\' ),
\'singular_name\' => __( \'Faculty\' ),
\'add_new_item\' => __( \'Add New Faculty Member\' ),
\'new_item\' => __( \'Add Faculty\' ),
\'add_new\' => __( \'Add Faculty Member\' ),
\'view_item\' => __( \'View Faculty Profile\' ),
\'not_found\' => __( \'No faculty members found\' ),
\'search_items\' => __( \'Search Faculty Members\' ),
\'edit_item\' => __( \'Edit Faculty Member Profile\' ),
\'description\' => __( \'A collection of the profiles for Intrigue Dance Intensive faculty members.\' )
),
\'public\' => true,
\'menu_position\' => 5,
\'rewrite\' => array(\'slug\' => \'faculty\'), // Don\'t forget this comma
// ADD ME HERE; LIST WHATEVER FEATURES FOR WHICH YOU WANT TO ADD SUPPORT
\'supports\' => array(\'title\',\'editor\',\'author\',\'thumbnail\',\'excerpt\',\'comments\')
)
);
}
?>
add\\u action(\'init\',\'create\\u post\\u type\');