0
自分のランディングページを必要とする一連の異なるカテゴリを持つカスタム投稿タイプを作成しました。今、私はWP Post Type Templatesに行きましたが、私はまだカテゴリページを表示することができません。 thisをオフに基づいてカスタム投稿タイプカテゴリページ/テンプレート
- 登録ポストタイプのアーカイブ:今CPTのカテゴリページは、ちょうど404
私は、次の操作を実行しようとしています。
- archive-teams.phpとarchive-team.phpを使用してアーカイブテンプレートファイルを作成します。
- category-teams.phpとカテゴリチーム.phpを試してみてください。
- フラッシュされたpermalinks百万回。ここで
私はポストの種類と分類を登録しています方法です:
add_action('init', 'create_team');
function create_team() {
register_taxonomy(
'teams',
array(),
array(
'hierarchical' => true,
'labels' => array
(
'name' => _x('Teams', 'taxonomy general name'),
'singular_name' => _x('Team', 'taxonomy singular name')
),
'show_ui' => true,
'show_admin_column' => true,
'query_var' => 'team',
'rewrite' => array(
'slug' => 'our-team',
),
)
);
register_post_type(
'team',
array(
'labels' => array
(
'name' => _x('Team Members', 'post type general name'),
'singular_name' => _x('Team Member', 'post type singular name')
),
'supports' => array('title', 'editor', 'thumbnail'),
'public' => true,
'rewrite' => array
(
'slug' => 'our-team/%teams%',
'with_front' => false
),
'query_var' => 'team',
'has_archive' => 'team',
'taxonomies' => array('teams','category','post_tag'),
)
);
}
あなたがこれで必要とするもの –
あなたは直面している問題は何ですか? –
@ Mr.HKカテゴリテンプレートが動作していない/表示され、404が表示されます。 – alexmattorr