818 pointsLike some sort of WPMU DEV God"Mindblowingly helpful member
nickd32
Member
—
9th September 2011
I've created a Custom post type called "Movie" -- and I want to use 2 different taxonomies... "Actors" and "Characters"
For example...
- Movie: When Harry Met Sally
- Actors: Billy Crystal, Meg Ryan
- Characters: Harry Burns, Sally Albright
That part is easy. The question I can't figure out is how to associate one taxonomy with another.
For example:
- "Billy Crystal" as "Harry Burns"
- "Meg Ryan" as "Sally Albright"
I thought about adding a custom field to the "Actors" taxonomy called "Characters they've played", but I'd like that to pull from my other taxonomy called "Characters".
Any ideas on how to relate one tax with another tax? I don't think you can make a taxonomy of a taxonomy.
I've created a Custom post type called "Movie" -- and I want to use 2 different taxonomies... "Actors" and "Characters"
For example...
- Movie: When Harry Met Sally
- Actors: Billy Crystal, Meg Ryan
- Characters: Harry Burns, Sally Albright
That part is easy. The question I can't figure out is how to associate one taxonomy with another.
For example:
- "Billy Crystal" as "Harry Burns"
- "Meg Ryan" as "Sally Albright"
I thought about adding a custom field to the "Actors" taxonomy called "Characters they've played", but I'd like that to pull from my other taxonomy called "Characters".
Any ideas on how to relate one tax with another tax? I don't think you can make a taxonomy of a taxonomy.
Within the Actors you could perhaps list those Characters as linked terms and in the Characters you could link to the Actor who played the part, potentially providing for numerous Actors representing that Character across various versions of the movie.
Admittedly it's a bit much, as you'd have an incredible amount of posts within those post types just to cover them all, but I can't imagine how otherwise to do it myself.
I'll mention this to some of the other guys over here too, and see if they've got any ideas.
Yeah, I'd only echo what David said. Essentially, you're creating a kind of relational database but trying to connect different data within the same table which isn't going to work.
Hopefully that analogy kinda helps but yes, David is spot on there.
Responses (2)
WPMU DEV Fanatic — 9th September 2011 #
Hi nickd32,
The only way I can think of would be to create custom post types, Actors and Characters and link the taxonomy terms to those post types like in the following article:
http://justintadlock.com/archives/2010/08/20/linking-terms-to-a-specific-post
Within the Actors you could perhaps list those Characters as linked terms and in the Characters you could link to the Actor who played the part, potentially providing for numerous Actors representing that Character across various versions of the movie.
Admittedly it's a bit much, as you'd have an incredible amount of posts within those post types just to cover them all, but I can't imagine how otherwise to do it myself.
I'll mention this to some of the other guys over here too, and see if they've got any ideas.
Cheers,
David
Sales & Support Pro — 12th September 2011 #
Yeah, I'd only echo what David said. Essentially, you're creating a kind of relational database but trying to connect different data within the same table which isn't going to work.
Hopefully that analogy kinda helps but yes, David is spot on there.
Phil
Become a member