我相信我正在努力实现的目标是很容易的,但我没有掌握这里需要什么。
我想在管理面板中有一个部分。。。让我们说“页面节”
在这种情况下,我希望能够添加多种帖子类型。i、 e.让我们说
“添加成员”、“添加foo”、“添加栏”。。。
我目前有
add_action( \'init\', \'add_item\' );
add_action( \'init\', \'add_item2\' );
function add_item(){
register_post_type(\'item1\', array(
\'label\' => \'Item label\',
\'public\' => true,
\'show_ui\' => true,
\'capability_type\' => \'page\',
\'capabilities\' => array(
),
\'hierarchical\' => true,
\'rewrite\' => array(\'slug\' => \'puds\'),
\'query_var\' => true,
\'supports\' => array(
\'title\',
\'editor\',
\'excerpt\',
\'custom-fields\',
\'revisions\',
\'thumbnail\',
\'author\',
\'page-attributes\',
\'post-formats\'
)
) );
}
function add_item2(){
register_post_type(\'item2\', array(
\'label\' => \'Item label 2\',
\'public\' => true,
\'show_ui\' => true,
\'capability_type\' => \'page\',
\'capabilities\' => array(
),
\'hierarchical\' => true,
\'rewrite\' => array(\'slug\' => \'puds\'),
\'query_var\' => true,
\'supports\' => array(
\'title\',
\'editor\',
\'excerpt\',
\'custom-fields\',
\'revisions\',
\'thumbnail\',
\'author\',
\'page-attributes\',
\'post-formats\'
)
) );
}这将产生
但我想要一个菜单标题和多个菜单选择。。。
有什么想法吗?