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.

I have created a custom taxonomy as described on the Codex. I have "public" set to true, which show_in_nav_menus is supposed to inherit from, and have also explicitly added the show_in_nav_menus variable and set it to true. However, it only shows up for the user with the username "Admin". None of the other users can see it under Appearance > Menus, even ones marked as being an "Administrator".

Here's my exact code:

function create_con_casino_reviews() {
    register_post_type( 'con_casino_reviews',
        array(
            'labels' => array(
                'name' => __( 'Casino Reviews' , 'continuum'),
                'singular_name' => __( 'Casino Review' , 'continuum'),
                'add_new' => __('Add new review', 'continuum'),
                'edit_item' => __('Edit review', 'continuum'),
                'new_item' => __('New review', 'continuum'),
                'view_item' => __('View review', 'continuum'),
                'search_items' => __('Search reviews', 'continuum'),
                'not_found' => __('No reviews found', 'continuum'),
                'not_found_in_trash' => __('No reviews found in Trash', 'continuum')
            ),
            'public' => true,
            'menu_position' => 25,
            'menu_icon' => get_stylesheet_directory_uri() . '/images/review-casino.png',
            'rewrite' => array('slug' => 'casino-review'),
            'supports' => array('title','editor','author','thumbnail','excerpt','trackbacks','custom-fields','comments','revisions'),
            'taxonomies' => array('category', 'post_tag'),
            'show_in_nav_menus' => true
        )
    );
}
add_action( 'init', 'create_con_casino_reviews' );

If I change:

register_post_type( 'con_casino_reviews',

to be:

register_post_type( 'con_casino_reviewss',

It works just fine.

share|improve this question

2 Answers 2

Can you see it when you open the 'Screen Options' menu on the top right of the admin next to the 'Help' button? And with another user name?

Am a bit confused because your code doesnt show any register_post_type() function. Also, do you want to create a custom post type or a custom taxonomy?

Try with this basic code to create a custom post type, to see if it works for you:

/* books custom post type */
add_action( 'init', 'create_books' );
function create_books() {
    register_post_type( 'cpt-books',
        array(
            'labels' => array(
                'name' => __( 'Books' ),
                'singular_name' => __( 'Book' )
                ),
            'public' => true,
            'show_ui' => true,
            'publicly_queryable' => true,
            'exclude_from_search' => false,
            'menu_position' => 4,
            'query_var' => true,
            'supports' => array( 'title', 'editor' )

        )
    );
}
share|improve this answer
    
I fixed my code, when I was editing it for this post I accidentally deleted the "register_post_type(" function call. Sorry... –  cmcculloh Jun 10 '11 at 1:16
    
So it's all fine now? –  kevin Jun 10 '11 at 15:03
    
No, sorry, I meant I fixed the code in my question. It still doesn't work, but, YOUR code DOES work. So I'm trying to figure out what the difference between your code and my code is now.... thanks! –  cmcculloh Jun 10 '11 at 16:37
    
OK, I updated my question with the exact code that does not work. When I change the text 'con_casino_reviews' to something else (like, 'con_casino_reviewsssss') it works fine. WHY??? –  cmcculloh Jun 10 '11 at 16:51
1  
Might be a conflict with something already possessing this name because i tested your code without any modification on a test wp installation and it works fine, the custom post type 'Casino reviews' shows up in the admin. –  kevin Jun 10 '11 at 19:06
up vote 0 down vote accepted

Make sure you click "Screen Options" and check the checkbox for each menu you want to be able to select. For each user.

-_-

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.