I have a CPT called "books", a custom taxonomy called "book" for this CPT, and a "taxonomy-books.php" template in which I display my "books" terms using get_terms(). I don't understand (yes, I googled the problem) how to visit the page attached to this template. For one, "www.my_site.com/books/" doesn't work (page not found). Here's how I defined my custon taxonomy:
$labels = array( 'name' => 'Books', 'singular_name' => 'Book', 'search_items' => 'Search Books', 'popular_items' => 'Popular Books', 'all_items' => 'All Books', 'parent_item' => 'Parent Book', 'edit_item' => 'Edit Book', 'update_item' => 'Update Book', 'add_new_item' => 'Add New Book', 'new_item_name' => 'New Book', 'separate_items_with_commas' => 'Separate Books with commas', 'add_or_remove_items' => 'Add or remove Books', 'choose_from_most_used' => 'Choose from most used Books' ); $args = array( 'label' => 'Books', 'labels' => $labels, 'public' => true, 'hierarchical' => true, 'show_ui' => true, 'show_in_nav_menus' => true, 'args' => array( 'orderby' => 'term_order' ), 'rewrite' => array( 'slug' => 'books', 'with_front' => false ), 'query_var' => true ); register_taxonomy( 'books', 'book', $args );
So articles online made me think that the "rewrite" line was in cause, I removed it and it's the same.