いつもお世話になっております。
現状、「http://ドメイン名/house」になっているところを
「http://ドメイン名/service/house」というように、前に階層をつけたいです。
serviceのページは固定ページです。
固定ページでarchive-house.php
をテンプレートにして、「service」を親に選んでも
カスタム投稿がうまくいきません。
お力貸していただけると幸いです。
宜しくお願い致します。
php
1 //カスタム投稿 2 function new_post_type () { 3 4 register_post_type( 5 'house', 6 array( 7 'label' => 'ハウス', 8 'public' => true, 9 'has_archive' => true, 10 'hierarchical' => true, 11 'supports' => array('title','editor'), 12 'menu_position' => 16 13 ) 14 ); 15 16 17 flush_rewrite_rules( false ); 18 } 19 add_action('init','new_post_type');
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/01/19 09:19
2017/01/19 09:32