I've got a Custom Post Type with a Custom Taxonomy set up. So how do I create an archive template to display posts from that CPT, limited by taxonomy?

Here's the deal:

The CPT is called Shows. Each post represents an upcoming concert. Its archive page lives at mysite.com/shows.

The taxonomy is called Bands. Each Show post is tagged with the Band performing the concert.

What I want is to create an archive page to display all Show posts tagged with a certain band.

For example, I want the visitor to be able to open mysite.com/shows/radiohead, and see all of the Shows posts tagged with "Radiohead" in the Bands taxonomy.

How do I publish a template that will support that URL structure?

Thanks for any help you can provide.

1 Answer 1


Having Shows as a shared slug for your post type and taxonomy never end well, And you will not be able to do this using WP_Rewrite alone, since it can't distinguish between term slugs and post slugs.

take a look at this similar question which has a few solutions but the suggestion is to use a different slugs post types and taxonomies.

  • Thanks - I may not have explained this well. My CPT is "Shows," with a slug of "shows." The taxonomy is called "Bands," with a slug of "bands." What I want is to be able to display an archive of posts from the "Shows" CPT that are tagged with a term from the "Bands" taxonomy. Ideally, the URL structure should be mysite.com/shows/radiohead, where "shows" represents the slug of the CPT, and "radiohead" represents the slug of designated term from the "Bands" taxonomy. I'd appreciate any insight as to how to make that happen. Commented Aug 21, 2012 at 18:02
  • That's is what is got from your question and that's called sharing a slug.
    – Bainternet
    Commented Aug 22, 2012 at 5:57

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.