place
// Register Custom Post Type
function cwp_place_post_type() {
$labels = array(
'name' => '場地',
'singular_name' => '場地',
'menu_name' => '場地',
'name_admin_bar' => '場地',
'parent_item_colon' => 'Parent Item:',
'all_items' => '所有場地',
'add_new_item' => '新增場地',
'add_new' => '新增場地',
'new_item' => '新場地',
'edit_item' => '編輯場地',
'update_item' => '更新場地',
'view_item' => '查看場地',
'search_items' => 'Search Item',
'not_found' => 'Not found',
'not_found_in_trash' => 'Not found in Trash',
);
$rewrite = array(
'slug' => 'place',
'with_front' => true,
'pages' => true,
'feeds' => true,
);
$args = array(
'label' => '場地',
'description' => 'Place Description',
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'custom-fields', ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-location-alt',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => 'place-archive',
'exclude_from_search' => false,
'publicly_queryable' => true,
'rewrite' => $rewrite,
'capability_type' => 'post',
);
register_post_type( 'place', $args );
}
add_action( 'init', 'cwp_place_post_type', 0 );