• Resolved magicmiles

    (@magicmiles)


    The video below illustrates the problem. However, for those not wanting to watch the video.

    I have 13 Custom Post Types (CPT) and I’m planning on adding a lot more. Every time I add one, it takes up more screen real estate. Not good.

    Is there a way to put all of the existing CPTs under one Menu item, say another CPT that’s just a dummy for the LIBRARY of CPTs that I’ve created ?

    I created my CPTs with CPTUI and have CPTUIE installed as well.

    video -> https://drive.google.com/open?id=0B07JCz36ivtAYVlUVDhrTW8xeWs

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    The field below the “show in menu” option is what you’re looking for here.

    https://cloudup.com/cqSH7AyQH9b

    You can see that I have managed to move my “movie” and “tv_show” post types as a submenu of the default “page” post type, as well as what value is saved to do so.

    From the Codex:

    show_in_menu
    (boolean or string) (optional) Where to show the post type in the admin menu. show_ui must be true.

    Default: value of show_ui argument

    ‘false’ – do not display in the admin menu
    ‘true’ – display as a top level menu
    ‘some string’ – If an existing top level page such as ‘tools.php’ or ‘edit.php?post_type=page’, the post type will be placed as a sub menu of that.

    Note: When using ‘some string’ to show as a submenu of a menu page created by a plugin, this item will become the first submenu item, and replace the location of the top-level link. If this isn’t desired, the plugin that creates the menu page needs to set the add_action priority for admin_menu to 9 or lower.
    Note: As this one inherits its value from show_ui, which inherits its value from public, it seems to be the most reliable property to determine, if a post type is meant to be publicly useable. At least this works for _builtin post types and only gives back post and page.

    Thread Starter magicmiles

    (@magicmiles)

    @tw2113 Michael

    Thanks! I was entering the slug of the page I post_type that I wanted it to appear under.

    Along the same lines, is it possible to remove the other items of a menu and just have the menu items appear like below ?

    This is the result of using the show_in_menu:

    –> NEW FRUITS
    —–> ADD NEW
    —–> CATEGORIES
    —–> TAGS
    —–> ALL BANANAS

    What I would like to do is

    –> NEW FRUITS
    —–> BANANAS
    —–> APPLES
    —–> ORANGES

    Thereby removing the ‘Add New’, ‘Categpries’ and the word ‘ALL’ from the NEW menu ???

    Miles.

    • This reply was modified 8 years, 4 months ago by magicmiles. Reason: clarity
    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    I believe there is, regarding the “Add New” part, but it’s not something that is available through our plugin. Regarding the categories part, just have the parent post type you’re using not have a category involved.

    Thread Starter magicmiles

    (@magicmiles)

    Thanks! Got it done.

    https://imgur.com/a/qD0UQ

    Would love to get rid of the “ALL” before the links…but I can live with it the way that it is. Thanks again!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Multiple CPTs Menus under 1 Menu ?’ is closed to new replies.