今現在wordpessで開発をしているのですがタクソノミーページが表示されません。
カスタム投稿タイプ:intern
カスタム分類名:interntype
タグ名:engineer
表示させたいページ:taxonomy-interntype-engineer.php
となっております。
以下はfunctions.phpになります。
どなたかご教授の方お願いします。
php
1add_action( 'init', 'create_post_type' ); 2function create_post_type() { 3 register_post_type('intern', 4 array( 5 'label' => '募集の種類', 6 'description' => '', 7 'public' => true, 8 'show_ui' => true, 9 'show_in_menu' => true, 10 'capability_type' => 'post', 11 'hierarchical' => false, 12 'rewrite' => array('slug' => 'recruit/intern'), 13 'query_var' => false, 14 'has_archive' => true, 15 'exclude_from_search' => false, 16 'menu_position' => 20, 17 'supports' => array( 18 'title', 19 'editor', 20 'revisions', 21 'page-attributes' 22 ), 23 'taxonomies' => array('interntype'), 24 'labels' => array ( 25 'name' => 'インターンの種類', 26 'all_items' => 'インターン一覧' 27 ) 28 ) 29 ); 30 31 register_taxonomy( 32 'interntype', 33 'intern', 34 array( 35 'hierarchical' => true, 36 'label' => '募集', 37 'show_ui' => true, 38 'query_var' => true, 39 'rewrite' => true, 40 'singular_label' => 'インターンの種類' 41 ) 42 ); 43}
あなたの回答
tips
プレビュー