I’ve created a custom post type portfolio
and a taxonomy
of course.
function taxonomies_portfolio() {
$labels = array(
'name' => _x( 'Portfolio categories', 'taxonomy general name' ),
'singular_name' => _x( 'Portfolio categories', 'taxonomy singular name' ),
'search_items' => __( 'Query portfolio categories' ),
'all_items' => __( 'All portfolio categories' ),
'parent_item' => __( 'Parent category' ),
'parent_item_colon' => __( 'Parent category:' ),
'edit_item' => __( 'Edit portfolio category' ),
'update_item' => __( 'Update portfolio category' ),
'add_new_item' => __( 'Add Edit portfolio category' ),
'new_item_name' => __( 'New portfolio category' ),
'menu_name' => __( 'Categories' ),
);
$args = array(
'labels' => $labels,
'hierarchical' => true,
'rewrite' => true
);
register_taxonomy( 'portfolio_category', 'portfolio', $args );
}
add_action( 'init', 'taxonomies_portfolio', 0 );
Is it possible to create 1 template file to display all items of a single category? I’ve tried to create a taxonomy.php
but without success. What is the correct template name to work with?