I'm planning to use a couple of custom post types for a plugin of mine. The whole plugin should reside under 1 toplevel menu item. Thus I would prefer a menu structure like so:
- Custom Post Type #1
- Custom Post Type #2
This is possible by including
'show_in_menu' => 'my_plugin_toplevel_menu_item_slug' in
register_post_type when registering my custom post types. Howerer, there are a few issues I've come across using this method.
- I have no say in how the title should be outputted. I would prefer to use
- When using
'show_in_menu', the submenu page order cannot be altered. The custom post types are placed at the top automatically, because I guess Wordpress just gets to it quicker than I do.
- The h2 icon disappears for some reason (I haven't really looked into this yet though, it might be very easy to solve).
Does anybody have an idea how to tackle these issues elegantly?
See temporary solution in my answer below.