I am building a custom menu section (a new item with subitems in the main menu section on the left side) in the WordPress Administration of my website. The section shall include a main post type, and for this you should be able to link category and country.

It would be possible to use taxonomies, but taxonomy only supports multiple choices. Therefore, I want to be able to create new post types for category and country instead of taxonomies.

But it won't work out if I want it to be under the same menu section? Please help.

  • It probably helps if you write what a menu section actually is. Is it a main entry in the admin menu that is displayed on the left side in the admin? Then it's probably more clear what does not work. Please edit your question accordingly, because with the current description I do not know if I really understand your problem.
    – hakre
    Commented Nov 17, 2010 at 12:58
  • Okey. I have done that now. Please help me. Commented Dec 2, 2010 at 9:47

2 Answers 2


WordPress let's you define where a post type appears in the args where you register it. It's the show_in_menu argument. You can set it to true, false or a the slug (a string) of the page under which you'd like it to appear.

So, let's say you already have a post type "main". To display another post type under that you'd set the show_in_menu argument, like so:


// the register the post type
add_action( 'init', 'wpse4178_register' );
function wpse4178_register()
    // probably some more args up here.
    $args['show_in_menu'] = 'edit.php?post_type=main';
    register_post_type( 'country', $args );
  • Your $args array must be inside of your function.
    – Pippin
    Commented Nov 6, 2011 at 15:31

You need to modify the menu individually by code, most certainly by a plugin. Administration Menus (Wordpress Codex) contains a lot of information how the menu can be controlled. If nothing helps, you can directly control the menu via the associated global variable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.