WordPress.org

Support

Support » How-To and Troubleshooting » Categories and tag admin menu items not showing under post type

Categories and tag admin menu items not showing under post type

  • Hi,

    in order to have less plugins to maintain, I tried to deactivate Custom Post Types UI and write myself the code for my post types (foto, video) and my taxonomy (fototag AKA “Media tag”)

    With the plugin my admin menu was (just for foto):

    Foto Gallery
    – Add new
    – Categories
    – Post tag
    – Media tag

    Now it is:

    Foto Gallery
    – Add new
    – Media tag

    Categories and Post tag are missing (and in the post-type editing too…and they’re not hidden just because of “Screen options” 🙂 ).

    this is the code I inserted in my functions.php:

    $labels = array(
    		'name' => 'Media tag',
    		'singular_name' => 'Media tag',
    		'search_items' =>  'Cerca Media tag',
    		'all_items' => 'Tutti i Media tag',
    		'parent_item' => '',
    		'parent_item_colon' => '',
    		'edit_item' => 'Modifica Media tag',
    		'update_item' => 'Aggiorna Media tag',
    		'add_new_item' => 'Aggiungi Media tag',
    		'new_item_name' => 'Nuovo Media tag',
    		'menu_name' => 'Media tag',
    	);
    
    	register_taxonomy(
    		'fototag',
    		array('foto','video'),
    		array(
    		'hierarchical' => false,
    		'label' => 'Media tag',
    		'labels' => $labels,
    		'show_ui' => true,
    		'query_var' => true,
    		'rewrite' => array( 'slug' => 'mediatag' ),
    		'singular_label' => 'Foto Tag'
    	));
    
    	register_post_type('foto',
    		array(  'label' => 'Foto Gallery',
    						'labels' => array ( 'name' => 'Foto Gallery',
    																'singular_name' => 'Foto Gallery',
    																'menu_name' => 'Foto Gallery',
    																'add_new' => 'Aggiungi nuova',
    																'add_new_item' => 'Aggiungi nuova galleria',
    																'edit' => 'Modifica',
    																'edit_item' => 'Modifica gallery',
    																'new_item' => 'Nuova gallery',
    																'view' => 'Garda la gallery',
    																'view_item' => 'Garda la gallery',
    																'search_items' => 'Cerca gallery',
    																'not_found' => 'Gallery non trovata',
    																'not_found_in_trash' => 'Gallery non trovata nel cestino',
    																'parent' => 'Parent Foto Gallery'),
    						'description' => '',
    						'public' => true,
    						'show_ui' => true,
    						'capability_type' => 'post',
    						'hierarchical' => true,
    						'rewrite' => array('slug' => 'foto'),
    						'query_var' => true,
    						'supports' => array('title','editor'/*,'excerpt'*/,'trackbacks','custom-fields','comments'/*,'revisions'*/,'thumbnail','author'/*,'page-attributes'*/),
    						'taxonomies' => array('category','post_tag','mediatag')
    						)
    	);

    What am I missing?

    Thanks
    Matteo

Viewing 1 replies (of 1 total)
  • I resolved by (re?)-registering the default taxonomies (category & post tags), as explained in this post.

    Anybody knows about performance issues in this duplicate registration?

    Thanks
    Matteo

Viewing 1 replies (of 1 total)
  • The topic ‘Categories and tag admin menu items not showing under post type’ is closed to new replies.