Wordpressのカスタム投稿タイプ、カスタムタクソノミーのディレクトリ構造を以下のように正しいネスト構造にしたいと思っていますが、上手く動いてくれない状況です。
- カスタム投稿タイプ
http://localhost/(投稿タイプ)/(ターム名)/(投稿名)/
例 : http://localhost/solution/security/norton/
- カスタムタクソノミー
http://localhost/(投稿タイプ)/(ターム名)/
例 : http://localhost/solution/security/
- アーカイブ(一覧ページ)
http://localhost/(投稿タイプ)/
例 : http://localhost/solution/
問題点
カスタムタクソノミーにrewrite_slug: .
をいれると、カスタムタクソノミーページが404エラーになってしまいます。
カスタム投稿タイプ、アーカイブは正常に表示されています。
現在の設定
Custom Post Type UI
カスタム投稿タイプの設定 (テンプレート:single-solution.php)
name: solution label: ソリューション singular_label: ソリューション description: "" public: true publicly_queryable: true show_ui: true show_in_nav_menus: true delete_with_user: false show_in_rest: true rest_base: "" rest_controller_class: "" has_archive: true has_archive_string: "" exclude_from_search: false capability_type: post hierarchical: false rewrite: true rewrite_slug: "" rewrite_withfront: false query_var: true query_var_slug: "" menu_position: 5 show_in_menu: true show_in_menu_string: "" menu_icon: "" custom_supports: ""
カスタムタクソノミーの設定 (テンプレート:taxonomy-solution_category.php)
name: solution_category label: カテゴリー singular_label: カテゴリー description: "" public: true publicly_queryable: true hierarchical: true show_ui: true show_in_menu: true show_in_nav_menus: true query_var: true query_var_slug: "" rewrite: true rewrite_slug: . rewrite_withfront: true rewrite_hierarchical: true show_admin_column: false show_in_rest: true show_in_quick_edit: "" rest_base: "" rest_controller_class: "" meta_box_cb: ""
Custom Post Type Permalinks
カスタム投稿タイプのパーマリンクの設定
http://mit.xii.jp/solution/%solution_category%/%postname%/
カスタムタクソノミーのパーマリンク設定
カスタマイズされたカスタムタクソノミーのパーマリンクを使用する。 =>チェックしています。
これをオンにした場合、カスタムタクソノミーのパーマリンクは、http://mit.xii.jp/post_type/taxonomy/term となります。
と表記されています。
どなたか、アドバイスいただける方いらっしゃいましたらご教授いただけないでしょうか?

バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/01/15 02:45
2020/01/15 04:53