custom_taxonomy_books_cat
custom_taxonomy
if ( ! function_exists( 'custom_taxonomy_books_cat' ) ) { // Register Custom Taxonomy function custom_taxonomy_books_cat() { $labels = array( 'name' => _x( '本のカテゴリ', 'Taxonomy General Name', 'books-cat' ), 'singular_name' => _x( '本のカテゴリ', 'Taxonomy Singular Name', 'books-cat' ), 'menu_name' => __( '本のカテゴリ', 'books-cat' ), 'all_items' => __( '全てのカテゴリ', 'books-cat' ), 'parent_item' => __( 'Parent Item', 'books-cat' ), 'parent_item_colon' => __( 'Parent Item:', 'books-cat' ), 'new_item_name' => __( '新しいカテゴリ', 'books-cat' ), 'add_new_item' => __( 'カテゴリを追加する', 'books-cat' ), 'edit_item' => __( 'カテゴリを編集する', 'books-cat' ), 'update_item' => __( 'カテゴリを更新する', 'books-cat' ), 'view_item' => __( 'カテゴリを見る', 'books-cat' ), 'separate_items_with_commas' => __( 'カンマ区切りで入力', 'books-cat' ), 'add_or_remove_items' => __( '追加または削除', 'books-cat' ), 'choose_from_most_used' => __( '最も使われているカテゴリから選択', 'books-cat' ), 'popular_items' => __( '人気のカテゴリ', 'books-cat' ), 'search_items' => __( 'カテゴリを探す', 'books-cat' ), 'not_found' => __( '見つかりません', 'books-cat' ), 'no_terms' => __( '見つかりません', 'books-cat' ), 'items_list' => __( 'カテゴリ一覧', 'books-cat' ), 'items_list_navigation' => __( 'カテゴリ一覧ナビ', 'books-cat' ), ); $args = array( 'labels' => $labels, 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_admin_column' => true, 'show_in_nav_menus' => true, 'show_tagcloud' => true, ); register_taxonomy( 'books-cat', array( 'books' ), $args ); } add_action( 'init', 'custom_taxonomy_books_cat', 0 ); }