我注册了6个,但在wp admin菜单上似乎只输出了5个。如果我删除其中一个,它会相应地更新,所以据我所知,每个配置都是正确的。我还停用了所有插件并更改了菜单位置。
add_action(\'init\', \'register_my_cpt_organisation\');
function register_my_cpt_organisation() {
register_post_type(\'organisation_profiles\', array(
\'label\' => \'Organisation Profiles\',
\'description\' => \'\',
\'public\' => true,
\'show_ui\' => true,
\'menu_position\' => 15,
\'show_in_menu\' => true,
\'capability_type\' => \'post\',
\'map_meta_cap\' => true,
\'hierarchical\' => false,
\'rewrite\' => array( \'slug\' => \'organisation-profiles\', \'with_front\' => true),
\'query_var\' => true,
\'supports\' => array( \'title\', \'editor\', \'excerpt\', \'trackbacks\', \'custom- fields\', \'comments\', \'revisions\', \'thumbnail\', \'author\', \'page-attributes\' ),
\'labels\' => array (
\'name\' => \'Organisation Profiles\',
\'singular_name\' => \'Team Memeber\',
\'menu_name\' => \'Team\',
\'add_new\' => \'Add a Team Memeber\',
\'add_new_item\' => \'Add New Team Memeber\',
\'edit\' => \'Edit\',
\'edit_item\' => \'Edit Team Memeber\',
\'new_item\' => \'New Team Memeber\',
\'view\' => \'View Team Memeber\',
\'view_item\' => \'View Team Memeber\',
\'search_items\' => \'Search Team Memebers\',
\'not_found\' => \'No Team Memeber Found\',
\'not_found_in_trash\' => \'No Team Memeber Found in Trash\',
\'parent\' => \'Team\',
)
)
);
}