• $args = array(
    	'public'                        => true,
    	'hierarchical'                  => true,
    	'show_ui'                       => true,
    	'show_in_nav_menus'             => false,
    	'args'                          => array( 'orderby' => 'title' ),
    	'rewrite'               	=> array( 'slug' => 'collections', 'with_front' => false ),
    	'query_var'                     => true,
    );
    register_taxonomy( 'collection_categories', 'collection', $args );

    I want to make this taxonomy so that it cannot be accessed via the dashboard sidebar but you can still use it for a custom post type. If I disable “show_in_nav_menus”, nothing happens. I would expect this to hide the link in the nav menu, what else would that option be for?

    If I disable “show_ui” then it does not generate the link, but it also does not generate the category box for my custom post type making it useless.

    How do I hide the shortcut in the nav menu without hiding the category box when creating a post?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Nothing on this yet, huh? Damn. Same problem here.

    Did a little more digging around. “show_in_nav_menus” is for displaying the custom post type (cpt) on the Appearance > Menus page. NOT, the main menu in the admin area.

    Found the solution, and instead it’s accessible under the ‘show_in_menu’ option. Setting this to false will remove it from the side column. Setting it equal to your cpt URL will place that item within that cpt’s menu.

    For example, I have a simple Events cpt, and a secondary Venues cpt. To place the Venues cpt under the Events cpt, I added this line to my register_post_type arguments when creating the Venues cpt.

    'show_in_menu' => 'edit.php?post_type=event',

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Taxonomy option 'show_in_nav_menus' does not work’ is closed to new replies.