Custom Post Type Category subpage
-
Okay, so I have created a new custom post type, named sectors, and a sub category for this, named categories, using the code below:
`add_action( ‘init’, ‘create_sector_cat’ );
function create_sector_cat() {
register_taxonomy(
‘SectorCategories’,
‘sectors’,
array(
‘label’ => __( ‘Sector Categories’ ),
‘rewrite’ => array( ‘slug’ => ‘sectorcategories’ ),
‘hierarchical’ => true,
)
);
}`Now, when I press sector categories, it shows all categories which are created, using a file named sectorcategories.php
I then will have different ‘products’ inside this category, and I understand the filename should be taxonomy-sectorcategories.php, but this file isnt working?
- The topic ‘Custom Post Type Category subpage’ is closed to new replies.