I switched my site from categories to taxonomies for my custom post but I am having trouble getting it to work the same way. For categories I could have templates named something like category-travel.php
and then have my loop in that file. Now I am trying to replace the category list with something like this :
<?php
$taxonomy = 'Gallery';
$orderby = 'name';
$show_count = 0;
$pad_counts = 0;
$hierarchical = 1;
$title="";
$args = array (
'taxonomy' => $taxonomy,
'orderby' => $orderby,
'show_count' => $show_count,
'pad_counts' => $pad_counts,
'hierarchical' => $hierarchical,
'title_li' => $title
);
wp_list_categories($args) ?>
and in functions
register_taxonomy( 'Gallery', array( 'photo' ), array( 'hierarchical' => true, 'label' => 'Galleries', 'singular_label' => 'Gallery', 'rewrite' => true ) );
Now when I link from that generated list, something like mysite.com/gallery/name
it is instead calling the archive.php
rather than the taxonomy-gallery.php
file I created. What am I doing wrong?
Sorry if this is a duplicate but I think that question is for something different and I cant believe that you would have to do a hack for this.