• Resolved johnhamman

    (@johnhamman)


    Hi all,
    I have created a custom post_type and a taxonomy to go with it. The taxonomy is not showing up in the nav-menus.php admin page?

    Here is my code, perhaps I am missing something?

    function products_register() {
    
    	$labels = array(
    		'name' => __( 'Products' ),
    		'singular_name' => __( 'Product' ),
    		'add_new' => __( 'Add New' ),
    		'add_new_item' => __( 'Add New Product' ),
    		'edit' => __( 'Edit' ),
    		'edit_item' => __( 'Edit Product' ),
    		'new_item' => __( 'New Product' ),
    		'view' => __( 'View Product' ),
    		'view_item' => __( 'View Product' ),
    		'search_items' => __( 'Search Products' ),
    		'not_found' => __( 'No Products found' ),
    		'not_found_in_trash' => __( 'No Products found in Trash' ),
    		'parent_item_colon' => ''
    	);
    
    	$args = array(
    		'labels' => $labels,
    		'public' => true,
    		'publicly_queryable' => true,
    		'show_ui' => true,
    		'query_var' => true,
    		//'menu_icon' => get_stylesheet_directory_uri() . '/product16.png',
    		'rewrite' => array('slug'=>'products'),
    		'capability_type' => 'post',
    		'hierarchical' => false,
    		'menu_position' => null,
    		//'show_in_nav_menus' => true,
    		'supports' => array('title','editor','thumbnail','comments')
    	  ); 
    
    	register_post_type( 'productpage' , $args );
    
    	register_taxonomy("Product Categories",
    					  array("productpage"),
    					  array("hierarchical" => true,
    							"label" => "Product Categories",
    							"singular_label" => "Product Category",
    							"rewrite" => true));
    
    }
Viewing 1 replies (of 1 total)
  • Thread Starter johnhamman

    (@johnhamman)

    Ok found the problem.

    Instead of

    register_taxonomy("Product Categories",
    ........

    I need to remove the space to change it to

    register_taxonomy("ProductCategories",
    .....

Viewing 1 replies (of 1 total)
  • The topic ‘Custom Taxonomy does not show up in WP Menu’ is closed to new replies.