Create template for taxonomy results limited by Custom Post Type

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:

Read More

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.

Related posts

Leave a Reply

1 comment

  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.