Pergunta

I am stuck in a problem and I need help from you guys. Below is the scenario:

  1. I have two Custom Post Type: Movie and Crew
  2. Crew will behave as a Single Person i.e Tom Cruise, Actor(CrewType)
  3. CrewType : Custom Taxonomy for Crew i.e Director, Actor

The question is I want to attach Crew(Tom Cruise) to Movie(MI2) so I have the following two views:

  1. When goto Movie Page I have Tom Cruise listed in Cast and Crew
  2. When goto Actor Biography page MI2 listed in Filmography.

Thanks i advance....

Foi útil?

Solução

I worked on a project that had a very similar scenario. You can create an additional custom taxonomy for the Crew post type called CrewMovie. The key is to have the slug for the terms in the CrewMovie taxonomy match the slug from the movie post type.

To list the crew when you are are on the movie page, you can do a custom query for post type = Crew & taxonomy = CrewMovie & term = movie-slug.

To list the movies When you are on crew page, you just list all the terms from the CrewMovie taxonomy.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top