Custom Post Type Permalinksのタームを使ったパーマリンク
-
お世話になります。
カスタム投稿タイプのURLで
http://ドメイン/カスタム投稿タイプ名/ターム/スラッグ/
の形式のURLにしたく、管理画面上で/%cus_sample(タクソノミー)%/%postname%/
にしたところ、URL自体は反映されたのですが、single-カスタム投稿.phpが適用されず、
index.phpが読み込まれてしまいます。
これをきちんとsingle-カスタム投稿.phpを読み込ませる方法を助言いただけないでしょうか?書いているregister_post_typeの設定は下記の通りです。
register_post_type ( 'sample', array( 'label' => 'カスタム投稿', 'labels' => array( 'name' => 'カスタム投稿', 'singular_name' => 'カスタム投稿', 'add_new_item' => '記事を追加', 'new_item' => '記事', 'view_item' => '記事を表示', 'not_found' => '記事は見つかりませんでした', 'not_found_in_trash' => 'ゴミ箱に記事はありません。', 'search_items' => '記事を検索' ), 'has_archive' => true, 'public' => true, 'show_ui' => true, 'taxonomies' => 'cus_sample', 'query_var' => true, 'rewrite' => true, 'hierarchical' => false, 'exclude_from_search' => false, 'menu_position' => 5, 'supports' => array( 'title','editor','excerpt', 'revisions','thumbnail','author' ), ) );
- トピック「Custom Post Type Permalinksのタームを使ったパーマリンク」には新たに返信することはできません。