请告诉我,有可能吗?我创建了一个自定义帖子,但我找不到如何添加页面模板选择功能的信息:
function trav_register_region_post_type() {
$labels = array(
\'name\' => _x( \'Regions\', \'Post Type General Name\', \'trav\' ),
\'singular_name\' => _x( \'Region\', \'Post Type Singular Name\', \'trav\' ),
\'menu_name\' => __( \'Regions\', \'trav\' ),
\'all_items\' => __( \'All Regions\', \'trav\' ),
\'view_item\' => __( \'View Region\', \'trav\' ),
\'add_new_item\' => __( \'Add New Region\', \'trav\' ),
\'add_new\' => __( \'New Region\', \'trav\' ),
\'edit_item\' => __( \'Edit Regions\', \'trav\' ),
\'update_item\' => __( \'Update Regions\', \'trav\' ),
\'search_items\' => __( \'Search Regions\', \'trav\' ),
\'not_found\' => __( \'No Regions found\', \'trav\' ),
\'not_found_in_trash\' => __( \'No Regions found in Trash\', \'trav\' ),
);
$args = array(
\'label\' => __( \'region\', \'trav\' ),
\'labels\' => $labels,
\'public\' => true,
\'hierarchical\' => true,
\'has_archive\' => true,
\'show_ui\' => true,
\'show_in_menu\' => true,
\'show_in_nav_menus\' => true,
\'show_in_admin_bar\' => true,
\'publicly_queryable\' => true,
\'supports\' => array( \'title\', \'editor\', \'thumbnail\', \'page-attributes\'),
\'exclude_from_search\' => false,
\'capability_type\' => \'page\'
);
register_post_type( \'region\', $args );
}