I was wondering for CPT list and editing pages to show under Posts tab instead of creating its own tab. I really want to use CPT (over using categories) because I’d have control over capability and different templates. Any input is appreciated.
1 comment
Comments are closed.
This can be done manipulating the global variable
$submenu
. In this example, the post type name isportfolio
. See comments in code.Then, remove the menu item altogether:
An in this example, we iterate through all post types that are public and not built-in and move the submenus inside the default Post post type.
And remove all menus with the same arguments.
Please, use this with care. In case of doubts/problems, use a One-by-One approach using the code above.
Results in the following. I’d remove the “Add new” from all post types, as there’s already a shortcut in the main page of each: