I’d like to store information about TV shows this way:
series (general information about the series)
–episode 1 (video of ep.1 + info about episode)
–episode 2 (video of ep.2 + info about episode)
…
–episode n
Taxonomies could be used for some of the additional info, such as production year, actors, network, etc.
I’ve currently set this up with a Page for each show and regular Posts for each episode. I link the episodes together with the Organize Series plugin.
Is this possible using just custom post types? It seems like it would make things easier as the site grows.
Thanks for any help.
I’m using this code for a metabox in a current project I’m working on:
This code outputs a select box that is populated by the post titles and post id’s of all posts of a certain type. If you place this in a metabox of a child post type, all you would need to do is to is select a parent post and update. WordpPress already looks for a form element called ‘parent_id’ to set a post’s parent, so there is no other code really needed, except to create the metabox:
Ironically enough, I’m doing this for a similar situation: I have a post type for a series, 2 other post types, one for episodes and one for DVD releases, both of which hook up to a series as a parent-child relationship using the post_parent field of a post.
Special thanks to @MikeSchinkel, whose code I modified
Yes, it’s possible, by using the post_parent field in the wp_posts table.
You will have to write a custom metabox for setting the relationship though.