0

We have many custom post types are are looking to tidy WP admin.

We are creating a custom menu :

function custom_admin_menus() {
    add_menu_page(
        'Group1',
        'Group1',
        'read',
        'group1',
        '',
        'dashicons-tag',
        40
    );

 }
 add_action( 'admin_menu', 'custom_admin_menus' );

Custom post types are then added to the menu via 'show_in_menu' => 'group1', - in addition to the CPT menu item we need it's default sub-menu to appear below, for example:

  • add new
  • tags
  • categories
  • custom taxonomies
  • re order

We need a way to add these simply along with the top level item and without hardcoding the items so it's maintainable in future.

Does anyone know of a way to include all sub-items of a CPT label from show_in_menu ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.