The theme that I'm developing is basically a portfolio, where the projects are custom post type and they are divided in categories (custom taxonomies). Here is how I'm defining both:
$labels = array(
'name' => _x('My Portfolio', 'post type general name'),
'singular_name' => _x('Portfolio Item', 'post type singular name'),
'add_new' => _x('Add New', 'portfolio item'),
'add_new_item' => _x('Add New Portfolio Item', 'add new portfolio item'),
'edit_item' => _x('Edit Portfolio Item', 'edit portfolio item'),
'new_item' => _x('New Portfolio Item', 'new portfolio item'),
'view_item' => __('View Portfolio Item'),
'search_items' => __('Search Portfolio'),
'not_found' => __('Nothing found'),
'not_found_in_trash' => __('Nothing found in Trash'),
'parent_item_colon' => ''
);
$args = array(
'labels' => $labels,
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'query_var' => true,
'menu_icon' => null,
'rewrite' => true,
'capability_type' => 'post',
'hierarchical' => false,
'menu_position' => null,
'supports' => array(null)
);
register_post_type('portfolio', $args);
register_taxonomy('project_category', array('portfolio'), array(
'hierarchical' => true,
'label' => "Project Categories",
'singular_label' => "Project Category",
'rewrite' => true
));
So in the homepage I'm listing all terms for the tax. "project_category" and I want a template file for a single term (for example, "jQuery Plugins" or "WordPress Themes") where I can list all project with that term.
I looked in the WP template hierarchy and I believe the template that I need is
taxonomy-$taxonomy.php
My file is named taxonomy-project_category.php and it doesn't find it. I also tried with taxonomy.php, term.php, archive.php ... no success. I think the problem is with the links:
<a href="<?php echo $term->slug; ?>"><?php echo $term->name; ?></a>
Any ideas? Cheers
www.yoursite.com?product_category=jquery-plugins
? And what do you mean doesn't find it? Doesn't find the template or doesn't find the content?