I am looking to build a theme that has an integrated resume, using custom post types. I have had a look at this question with regards to inserting post types within post types in the admin menu. The structure that I am planning is:
Resume
- View Employment
- Add Employment
- View Qualifications
- Add Qualification
- View Memberships
- Add Membership
- Options
How would I insert links to the appropriate post management screen in the menu?
[EDIT]
I have tried to create this in my local site, and have noticed that the menu only displays the post management page, not the editor (the opposite of what I assumed). I would like both to be displayed. Is this possible?
The good news is I have found a solution. The (kind of) bad news is that the menu has to be created manually. It would use a combination of the add_menu_page and add_submenu_page functions. The codex pages have the format for the functions.
The menu would be
add_action( 'admin_menu', 'register_my_custom_menu_page' );
function register_my_custom_menu_page(){
add_menu_page('My Custom Page', 'My Custom Page', 'manage_options', 'my-top-level-slug', '', '', 28);
add_submenu_page( 'my-top-level-slug', 'My Custom Page', 'My Custom Page', 'manage_options', 'my-top-level-slug');
add_submenu_page( 'my-top-level-slug', 'My Custom Submenu Page', 'My Custom Submenu Page', 'manage_options', 'my-secondary-slug');
}
Then, in the custom post type, the 'show_in_menu'
variable would be set to false
for each custom post type and the slugs posted into the appropriate variables in the function.