Post Type only showing for “Admin” under “Appearance” > “Menus”

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:

Read More
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.

Related posts

Leave a Reply

2 comments

  1. 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' )
    
            )
        );
    }