Custom Post Types Cannot be Hierarchical with 5.0>
-
Hi all,
I cannot seem to register a hierarchical custom post type since upgrading to 5.0.
I’m using register_post_type as follows:
register_post_type( 'custom_type', // let's now add all the options for this post type array( 'labels' => $labels /*defined elsewhere */ ), /* end of arrays */ 'description' => 'Example', 'public' => true, 'publicly_queryable' => true, 'exclude_from_search' => false, 'show_ui' => true, 'query_var' => true, 'menu_position' => 8, 'menu_icon' => 'dashicons-archive', 'rewrite' => array( 'slug' => 'custom_type', 'with_front' => false ), 'has_archive' => 'custom_type', 'capability_type' => 'post', 'hierarchical' => true, 'show_in_rest' => true, 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'sticky', 'page-attributes') ); /* end of register post type */
The Page Attributes meta box appears in the sidebar area, but only allows the user to manage the Order, no Parent drop down appears at all.
When I set ‘show_in_rest’ to false in order to bypass the new editor, the Parent drop down shows with no issue.
All plugins are deactivated, and I have no relevant errors in the error log or console. Core is up to date (5.0.3). I’ve tested this with Twenty Nineteen.
Has this functionality been removed from 5.0? Or is there a blip here that I’m not seeing?
Thanks for your time.
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Custom Post Types Cannot be Hierarchical with 5.0>’ is closed to new replies.