I have created a Custom Post Type that has a series of different categories that need their own landing page. Right now I have gone through WP Post Type Templates but I still cannot get the category page to show up. Right now the CPT category pages just 404.
I have tried to do the following:
- Register post type archives based off this.
- Create archive template files using archive-teams.php and archive-team.php.
- Tried using category-teams.php and category-team.php.
- Flushed permalinks 1 Million times.
Here is how I am registering the post type and taxonomy:
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' ),
)
);
}