I'm working on a site that will in part house information on products that many people have worked on in different roles. I'd like for people, the projects they've worked on, and their roles in the projects to be searchable using custom taxonomies. Projects and People are custom post types.
Let's use a movie as an example. That's not what the site is for, but the problem is exactly the same:
- Alice worked on Big Movie as the director and producer.
- Bob worked on Big Movie as an actor.
- Carl worked on Big Movie as the scriptwriter.
- David worked on Big Movie as another scriptwriter.
I want to be able to search for all directors, search for everyone related to Big Movie, and search for everything Alice worked on (and Bob, and Carl, etc.).
So far I've simply skimmed the codex and my thought is to have a hierarchical taxonomy "People" associated with the post type. Every entry will have two levels:
- Role
- Name
So the "People" taxonomy of Big Movie might look like this:
- Producer
- [Alice's Person post ID]
- Director
- [Alice's Person post ID]
- Writer
- [Carl's Person post ID]
- [David's Person post ID]
- Actor
- [Bob's Person post ID]
Is there a better or more efficient way to associate people posts with their particular roles on particular project posts? Does this approach actually solve the problem and allow for efficient searches for people based on the roles they have played, the roles they have played in particular projects, and the particular projects they have worked on?