• I am wondering if it is possible to create a custom post type that behaves like a nav menu in the Admin area.

    Basically I am working on a card tournament project that will require me to set up different levels in the tournament that consist of a couple different custom fields.

    I want these post types to be able to be assigned to different tournaments structures and these tournament structures can be used on any given tournament. I know I could just create a levels custom posttype and then create a structure taxonomy and then assign a level to multiple taxonomies but that relationship is sort of backwards in the way the site will be updated.

    The better way would be to have the Structure Post type behave like a menu and then allow me to drag and drop all the different levels that are created into a nav menu like structure.

    So hopefully that makes sense. Overall question. Is it possible to create a custom post type has the admin interface of a nav menu

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator bcworkz

    (@bcworkz)

    I would think if you simply registered a new menu location for this purpose, you could use the actual nav menu interface to arrange your posts. Instead of displaying this menu on the site as would normally be done, you could query the resulting nav_menu_items much as any other post type to extract associated information.

    While it’s odd to go to the appearance admin screens to manage something that does not appear on the site as such, I think it should otherwise work.

    Thread Starter DoodleDogCody

    (@doodledogcody)

    Yeah I thought of doing that but the problem is that the project would eventually become a multisite install where other users would need to be able to do the same and going to Appearance Menu’s would then become really confusing for others that are not exactly sure how it works.

    I assume that their has to be a plugin out there that uses that Menu UI for its own benefits, but I haven’t been able to find one yet to dig around in and figure out how they did it.

    Moderator bcworkz

    (@bcworkz)

    I think I would start by putting a copy of nav-menus.php in my plugin and adding it to the plugin’s admin menu structure. Start by altering the labels to fit and limiting which “nav menus” it works with, essentially excluding actual nav menus so any others are assumed to be tournaments.

    Learning from how plugins do things is a great learning tool, but learning how core developers do things works pretty well too!

    Thread Starter DoodleDogCody

    (@doodledogcody)

    Thanks for the input bcworkz, I will do that and see what I can come up with.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Register Post Type – Capability Type (nav menu item)’ is closed to new replies.