Can’t create more than 5 custom post types

I’ve registered 6 but only seems to output 5 on the wp-admin menu. If i delete one or the other it updates accordingly, so configuration of each one is correct as far as i know. I’ve also deactivated all plugins and changed menu position.

add_action('init', 'register_my_cpt_organisation');
function register_my_cpt_organisation() {
    register_post_type('organisation_profiles', array(
        'label' => 'Organisation Profiles',
        'description' => '',
        'public' => true,
        'show_ui' => true,
        'menu_position' => 15,
        'show_in_menu' => true,
        'capability_type' => 'post',
        'map_meta_cap' => true,
        'hierarchical' => false,
         'rewrite' => array( 'slug' => 'organisation-profiles', 'with_front' => true),
        'query_var' => true,
        'supports' => array( 'title', 'editor', 'excerpt', 'trackbacks', 'custom-   fields', 'comments', 'revisions', 'thumbnail', 'author', 'page-attributes' ),
        'labels' => array (
            'name' => 'Organisation Profiles',
            'singular_name' => 'Team Memeber',
            'menu_name' => 'Team',
            'add_new' => 'Add a Team Memeber',
            'add_new_item' => 'Add New Team Memeber',
            'edit' => 'Edit',
            'edit_item' => 'Edit Team Memeber',
            'new_item' => 'New Team Memeber',
            'view' => 'View Team Memeber',
            'view_item' => 'View Team Memeber',
            'search_items' => 'Search Team Memebers',
            'not_found' => 'No Team Memeber Found',
            'not_found_in_trash' => 'No Team Memeber Found in Trash',
            'parent' => 'Team',
        )
    )
    );
}

1 Answer
1

There isn’t a limit for how many post types that you can register, but I did notice that the name of your CPT, organisation_profiles, has 22 characters. That exceeds the limit of 20 characters specified in the docs for the $post_type parameter.

Leave a Comment