1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
| function custom_post_type() {
$labels = array(
'name' => _x('プロジェクト', 'post type general name'),
'singular_name' => _x('テスト(議事録)', 'post type singular name'),
'add_new' => _x('プロジェクトを追加', 'book'),
'add_new_item' => __('新しいプロジェクトを追加'),
'edit_item' => __('プロジェクトを編集'),
'new_item' => __('新しいプロジェクト'),
'view_item' => __('プロジェクトを編集'),
'search_items' => __('プロジェクトを探す'),
'not_found' => __('プロジェクトはありません'),
'not_found_in_trash' => __('ゴミ箱にプロジェクトはありません'),
'parent_item_colon' => ''
);
$args = array(
'labels' => $labels,
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'query_var' => true,
'rewrite' => true,
'capability_type' => 'post',
'hierarchical' => false,
'menu_position' => 2,
'supports' => array('title','editor', 'custom-fields')
);
register_post_type('project',$args);
}
add_action('init', 'custom_post_type'); |