在注册新自定义帖子类型的功能上,可以将此CPT设置为现有菜单项的子菜单。使用参数show_in_menu
例如:
register_post_type(
\'issue\',
apply_filters( \'wpit_register_issue_post_type\',
array(
\'labels\' => $issue_labels,
\'rewrite\' => $issue_rewrite,
\'supports\' => $issue_supports,
\'taxonomies\' => $issue_taxonomies,
\'menu_position\' => 5,
\'public\' => TRUE,
\'show_ui\' => TRUE,
\'show_in_menu\' => \'edit.php\',
\'can_export\' => TRUE,
\'capability_type\' => \'post\',
\'query_var\' => TRUE
)
)
);
您可以在鼠标上方找到项目的字符串,如
upload.php
在项目媒体上。