Two Custom Post Types, Share Two Taxonomies

I have two custom post types

  • Hotels
  • Things to do

And I have two taxonomies

Read More
  • Activities
  • Regions

So when a user sees a Hotel (custom post): the user can then see

  • the region it’s in
  • what activities they can do.

And viceversa as well

When the user sees Things To Do, he can see in which Region it is and what Hotels have the same type of Activity nearby.

The problem if I use two custom post type and create a taxonomy for it, I have no way of discerning each taxonomy related to a custom post:

Example: Hotels in X Region

I would get both the Hotels and Things to do custom post, within that taxonomy.


It’s basically the same issue as this question (which doesn’t have any great answer).

Related posts

Leave a Reply

1 comment

  1. I prefer set different taxonomies with distinct slug for them, I’m dealing with a project alike yours:

    • Hotels (taxonomy is continent-hotels) values: Europe, Asia etc
    • Places (taxonomy is continent-places) values: Europe, Asia etc

    Even if both itens share same taxonomy and value, is easier to link the content than filter in frontend. Maybe I’m wrong but things seems tidier this way.

    You can use non-hierarchical taxonomies for especific items such Hotels (romantic, economic, etc).