I have registered a new post type called Resources. I specify ‘page-attributes’ as a supported feature. When I go to create a new Resource post I see under Template that I can pick from a number of custom templates I have defined. But after I choose this and click update the setting isn’t saved and the template isn’t used. Any ideas?
function create_post_type() {
register_post_type( 'foo_resources',
array(
'labels' => array(
'name' => __( 'Resources' ),
'singular_name' => __( 'Resource' )
),
'public' => true,
'has_archive' => true,
'hierarchical' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'supports' => array('title','editor','author','page-attributes'),
'rewrite' => array(
'slug' => 'resources',
'with_front' => false
),
)
);
}
The page template for custom post type is not saved because it is checking whether the post type is “page” – it is not implemented for custom post types yet. The drop-down for the page templates was completely removed in 3.1.
This is my way how to deal with it:
Maybe you should consider to use Post Formats as another option.