Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

here is my custom post type and category:

//Register nav
register_nav_menus( array(
    'main_nav' => 'Main navigation'
) );

//Custom post types
add_action( 'init', 'create_post_type' );
function create_post_type() {
    register_post_type( 'assets',
        array(
            'labels' => array(
                'name' => __( 'Assets' ),
                'show_in_nav_menus' => true,
                'show_in_menu' => true,
                'singular_name' => __( 'Asset' )
            ),
        'public' => true,
        'has_archive' => true,
        )
    );
}

//Custom post type taxonomy/category
add_action( 'init', 'build_taxonomies', 0 );
function build_taxonomies() {
    register_taxonomy( 'categories', 'assets',
        array(
            'hierarchical' => true,
            'label' => 'Categories',
            'query_var' => true,
            'rewrite' => true
        )
    );
}

Even though I have 'show_in_nav_menus' turned on, it still won't show. Is there something wrong with my code?

It seems to work fine otherwise. Thanks

share|improve this question

1 Answer 1

Ugh. Fixed.

You have to show the 2nd category box in screen options, I could only see the default post categories. I'm glad I spent 40 mins trying new bits of code for that.

Thanks

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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