#23385 closed defect (bug) (worksforme)
Custom Menu metaboxes do not show in the /nav-menus.php page
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.5.1 |
Component: | Menus | Keywords: | |
Focuses: | Cc: |
Description
The problem: Custom menu metaboxes does not show for custom post type and custom taxonomy after fresh install.
Insert this code into the function.php file (of the Twenty Twelve theme):
function codex_custom_init() { $labels = array( 'name' => 'Books', 'singular_name' => 'Book', 'add_new' => 'Add New', 'add_new_item' => 'Add New Book', 'edit_item' => 'Edit Book', 'new_item' => 'New Book', 'all_items' => 'All Books', 'view_item' => 'View Book', 'search_items' => 'Search Books', 'not_found' => 'No books found', 'not_found_in_trash' => 'No books found in Trash', 'parent_item_colon' => '', 'menu_name' => 'Books' ); $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'book' ), 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'menu_position' => null, 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ) ); register_post_type( 'book', $args ); // Add new taxonomy, make it hierarchical (like categories) $labels = array( 'name' => _x( 'Genres', 'taxonomy general name' ), 'singular_name' => _x( 'Genre', 'taxonomy singular name' ), 'search_items' => __( 'Search Genres' ), 'all_items' => __( 'All Genres' ), 'parent_item' => __( 'Parent Genre' ), 'parent_item_colon' => __( 'Parent Genre:' ), 'edit_item' => __( 'Edit Genre' ), 'update_item' => __( 'Update Genre' ), 'add_new_item' => __( 'Add New Genre' ), 'new_item_name' => __( 'New Genre Name' ), 'menu_name' => __( 'Genre' ) ); $args = array( 'hierarchical' => true, 'labels' => $labels, 'show_ui' => true, 'show_admin_column' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'genre' ) ); register_taxonomy( 'genre', array( 'book' ), $args ); } add_action( 'init', 'codex_custom_init' );
2) Fresh install of WordPress;
3) Update permalinks;
4) Go to the "/nav-menus.php" page.
Expected to see two menu metaboxes, one for Books and the second for Genres.
Change History (8)
#2
@
12 years ago
- Summary changed from Custom Menu metaboxes not shown in the /nav-menus.php page to Custom Menu metaboxes do not show in the /nav-menus.php page
#6
follow-up:
↓ 7
@
12 years ago
- Cc mdhansen@… added
You have to open screen options and check the check boxes for both Books and Genres.
Works for me.
#7
in reply to:
↑ 6
@
12 years ago
- Keywords reporter-feedback removed
- Resolution set to fixed
- Status changed from new to closed
Replying to MikeHansenMe:
You have to open screen options and check the check boxes for both Books and Genres.
Works for me.
I never looked into there before, Thanks for the tip!
It works as MikeHansenMe has suggested.
Note: See
TracTickets for help on using
tickets.
Works perfect for me. Not sure what goes wrong for you.