Custom post’s taxonomy set to other custom post?

Is it possible to set/connect first custom post’s taxonomy (values) to other custom post?

Just random and basic example to understand a little better:

Read More
  • First custom post: jazz concerts
  • Second custom post: places to crash/sleep for night
  • Both custom posts has it’s own taxonomies and post_metas, for
    example: location, price etc.
  • Now we need a connection between posts & taxonomies so that you find most nearest locations to crash if you are going to jazz concert – that can probably be done by WP_query & I got this.

I’ve never seen anything like that in stackoverflow or in WP docs. I tried but it was too long, complicated, didn’t make any sense and generated infinite errors & I thought I ask before trying again, maybe someone has been dealing with this kind of situation.

Do I just need to name taxonomies and post_meta differently and get them to query same way as post’s own taxonomy and post_meta? And all same from here?

How to get other post’s taxonomy/post_meta dropdown box or other types of inputs to admin edit page?

I hope that I expressed myself clearly. If there’s any confusion or questions, let me know & I’ll provide additional information or explain something in more depth.

Related posts

1 comment

  1. You can register a taxonomy against several post types: link in the second parameter of register_taxonomy() you can provide an array of post types. Those post types will then have the same taxonomy.

Comments are closed.