Hi David,
Sorry for reopening this, but I’ve set up my CPT with show_in_rest => true, still it doesn’t show in the “Select post type” dropdown.
Here’s how I registered the post type :
$labels = array(
'name' => __( 'Occasions', TEXT_DOMAIN ),
'singular_name' => __( 'Occasion', TEXT_DOMAIN )
);
$args = array(
'label' => __( 'Occasions', TEXT_DOMAIN ),
'labels' => $labels,
'supports' => array( 'title', 'thumbnail' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_admin_bar' => true,
'menu_position' => 35,
'menu_icon' => 'dashicons-hammer',
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => false,
'capability_type' => 'post',
'show_in_rest' => true,
);
register_post_type( 'occasions', $args );
I tried flushing_rewrite_rules via code and refreshing the page, but it doesn’t work. Maybe there’s another setting here preventing my CPT from showing ?
Thanks !