サポート » 使い方全般 » タームの一覧ページがNotFoundになってしまう

  • 解決済 umioyo

    (@umioyo)


    いまいちタクソノミーとタームの理解が追いついていないので正しく質問できるか不安なのですが・・・

    カスタム投稿を以下のように作成しました。
    ネットで探した情報のコピペで以下のような形で追加しています。

    function create_post_type() {
      register_post_type('faq',
      array(
        'label' => 'よくある質問',
        'public' => true,
        'has_archive' => true,
        'menu_position' =>6,
        'rewrite' => array('with_front' => false),
        'supports' => array('title','editor','thumbnail')
        )
      );
      //カテゴリの追加
        register_taxonomy(
            'faqcat',
            'faq',
            array(
              'hierarchical' => true,
              'update_count_callback' => '_update_post_term_count',
              'label' => 'カテゴリ', 
              'public' => true,
              'show_ui' => true
            )
          );
      //タグの追加
          register_taxonomy(
            'faqcattag',
            'faq',
            array(
              'hierarchical' => false,
              'update_count_callback' => '_update_post_term_count',
              'label' => 'タグ', 
              'public' => true,
              'show_ui' => true
            )
          );
    }
    add_action('init','create_post_type');
    

    他のページで

    <?php wp_tag_cloud(
        array(
            'taxonomy' => 'faqcattag',
            'largest' => '15',
            'smallest' => '15',
            'unit'  => 'px'
            )
        );
    ?>

    としてタグクラウド・・・タームクラウド?になるのでしょうか、の一覧を表示まで成功したのですが、この表示した一覧からリンクをクリックすると、飛んだ先がNotFoundになってしまいます。

    URLはhttps://xxx.xxx/faqcattag/ターム名
    となっており、良さそうな感じがします。
    taxonomy.phpもarchive.phpも用意してあります。
    パーマリンク系のプラグインは使用しておりません。

    どうぞよろしくお願いします。

2件の返信を表示中 - 1 - 2件目 (全2件中)
  • こんにちは

    リライトルールの更新(管理画面から「設定」->「パーマリンク設定」を選択し、何も変更せずに「変更を保存」をクリック)はしましたか?

    トピック投稿者 umioyo

    (@umioyo)

    そうでした!
    ありがとうございます。
    NotFoundではなくなりました。

2件の返信を表示中 - 1 - 2件目 (全2件中)
  • トピック「タームの一覧ページがNotFoundになってしまう」には新たに返信することはできません。