Parent field missing from custom post type in the block editor
Question
I have a hierarchical custom post type, but the Parent field is missing in the block editor sidebar.
register_post_type( 'guides',
[
'public' => true,
'hierarchical' => true,
'has_archive' => true,
'menu_position' => 20,
'menu_icon' => 'dashicons-format-aside',
'rewrite' => [
'slug' => 'guides',
'with_front' => false,
'feeds' => true
],
'supports' => [ 'title', 'editor', 'excerpt', 'revisions', 'page-attributes' ],
'show_in_rest' => true,
'rest_base' => 'cs_guides',
'taxonomies' => [ 'topic', 'county' ],
'labels' => [
'name' => __( 'Guides', 'textdomain' ),
'singular_name' => __( 'Guide', 'textdomain' ),
'add_new' => __( 'Add New', 'textdomain' ),
'add_new_item' => __( 'Add New Guide', 'textdomain' ),
'edit_item' => __( 'Edit Guide', 'textdomain' ),
'new_item' => __( 'New Guide', 'textdomain' ),
'all_items' => __( 'All Guides', 'textdomain' ),
'view_item' => __( 'View Guide', 'textdomain' ),
'search_items' => __( 'Search Guides', 'textdomain' ),
'not_found' => __( 'No Guides found', 'textdomain' ),
'not_found_in_trash' => __( 'No Guides found in trash', 'textdomain' ),
'parent_item_colon' => '',
'menu_name' => __( 'Guides', 'textdomain' ),
]
]
);
0
9 months
2022-04-27T12:27:59-05:00
2022-04-27T12:27:59-05:00 0 Answers
0 views
0
Leave an answer