I have no idea how to do this and really need your help please …

First I created a custom-post-template called "wr_event" - then I added a custom taxonomy (like categories) to this post-template!

    'Type of event',
        'taxonomy' => 'event_type',
        'label' => 'Types',
        'singular_label' => 'Type',
        'hierarchical' => true,
        'rewrite' => true)

I did all that in my functions.php file. The "types" I created in my taxonomy in the wp-backend right now are "Lectures", "Workshops", "Festivals".

If I create a post (event) and assign it to a "category" (taxonomy) I get this url localhost.com/lectures/my-post-title and the single-wr_event.php template is used.

This is already a big step towards what I finally want.

What I don't know is how I can now kind of create pages for my taxonomies like it automatically works for posts and categories?

e.g. I said I have this right now: localhost.com/lectures/my-post-title

but when I just enter localhost.com/lectures/ I want all the posts assigned to this taxonomie listed. And I'd like to add a navigation in my header that lists all taxonomies I created just like 'wp_list_categories'.

Any ideas on how to this?

2 Answers 2


You can create the file taxonomy-event_type.php. That will be used when you use the url /?event_type=lectures or /event_type/lectures.

You can use wp_list_categories by adding 'taxonomy' => 'event_type' to the arguments (see http://codex.wordpress.org/Template_Tags/wp_list_categories#Display_Terms_in_a_custom_taxonomy)

  • Thank you very much! This worked just fine! Only last question I have is how I can filter the posts by term on each "category". So right now just like you posted the taxonomy-event_type.php template is used for my taxonomy. When I call /event_type/lectures I use a simple query $loop = new WP_Query( $args ); to get all posts. However on the lectures-page I only want to see/filter all lectures from this taxonomy. Any idea how I can filter this within the same taxonomy-event_type.php template? Thank you very much! Commented Apr 10, 2012 at 14:22
  • 1
    Not sure I understand correctly but you should let wordpress do the query. When you call /event_type/lectures wordpress has already filtered the posts for you and you just have to output them. (for example: while ( have_posts() ) : the_post(); the_title(); endwhile; )
    – offroff
    Commented Apr 10, 2012 at 18:37
  • Thank you, didn't know wordpress handles this automatically! Commented Apr 10, 2012 at 20:14
   function wp_list_tax_terms($tax = 'category',$order,$hide_empty = FALSE){
    $terms = get_terms( $tax, array(
        'orderby'    => $order,
        'hide_empty' => $hide_empty
     if ( $count > 0 ){
     echo '<ul>';
     foreach ( $terms as $term ) {
       echo '<li><a href="'.$term->name.'">'.$term->name.'</a></li>';   
     echo '</ul>';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.