I've created a custom taxonomy and I'm trying to get Wordpress to display the taxonomy template when no term is defined. Currently Wordpress is only showing the template when a term is defined on the URL.
My taxonomy is called
projects and defined like this:
$args = array( 'labels' => array( 'name' => "Categories", 'singular_name' => "Category", 'search_items' => "Search Categories", 'popular_items' => "Popular Categories", 'all_items' => "All Categories", 'parent_item' => "Parent Category", 'parent_item_colon' => "Parent Category:", 'edit_item' => "Edit Category", 'update_item' => "Update Category", 'add_new_item' => "Add New Category", 'new_item_name' => "New Category Name", ), 'hierarchical' => TRUE, 'label' => 'Categories', 'query_var' => TRUE, 'rewrite' => array( 'slug' => 'projects' ), ); register_taxonomy('projects', 'project', $args);
Next to this I have created a template file called
Currently when I browse to the
http://mysite.com/projects URL, Wordpress falls back to the
index.php. How can I make it so that when no term is defined, Wordpress shows my
I should have added this straight away, I'm clearing my rewrite rules each time I make a change to try again.