I'm trying to create a custom post type that's supposed to be used for a publication issue -> article structure. Since the hierarchical structure is really only meant for pages (refer to hierarchical
section's note), I figured I'd configure the custom post type to act as a page.
Great, except I can't get it to work properly. Even after setting capability_type
to page
and hierarchical
to true
, the edit screen for the post type is still acting as though it's a post. There aren't any "parent" or "page template" attribute drop down menus.
If I change the capability_type
from page
to post
, literally nothing changes with the edit screen.
Here's my code:
register_post_type('publication', array(
'label' => 'Publication',
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'capability_type' => 'page',
'map_meta_cap' => true,
'hierarchical' => true,
'rewrite' => array('slug' => 'publication', 'with_front' => true),
'query_var' => true,
'supports' => array('title','editor','comments','revisions','author','page-attributes'),
'labels' => array (
'name' => 'Publications',
'singular_name' => 'Publication',
'menu_name' => 'Publications',
)
));
Any ideas what's wrong here?
Capability_type
has nothing to do with this. It's used to construct permissions. Do you have any plugins enabled on this site?