I have created custom post type for my project and I want to add custom post type with page attribute. I have done this with following code:
function register_pt_boutique()
{
register_post_type('boutique', array(
'label' => 'Boutiques',
'description' => 'This post type represents the featured items on the homepage.',
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'capability_type' => 'post',
'map_meta_cap' => true,
'hierarchical' => true,
// 'rewrite' => array('slug' => 'featured', 'hierarchical' => true, 'with_front' => false),
'query_var' => true,
'has_archive' => true,
'menu_position' => '7',
'supports' => array('title', 'page-attributes','thumbnail'),
// 'taxonomies' => array('page-attributes'),
'labels' => array(
'name' => 'Boutiques',
'singular_name' => 'Boutique',
'menu_name' => 'Boutiques',
'add_new' => 'Add Boutique',
'add_new_item' => 'Add New Boutique',
'edit' => 'Edit',
'edit_item' => 'Edit Boutique',
'new_item' => 'New Boutique',
'view' => 'View Boutique',
'view_item' => 'View Boutique',
'search_items' => 'Search Boutique',
'not_found' => 'No Boutique',
'not_found_in_trash' => 'No Boutique Found in Trash',
'parent' => 'Parent Boutique',
)
));
}
Using this code page attribute option come with two fields ("parent" and "order") at admin side but without "template" field option. I want page attribute with "template" field.
