Hierarchical Custom Post Types or Similar

Doing a site for an architecture firm. Want to organize this very intelligently. I know of a lot of different ways to do what I’m about to explain, but I want to know the most efficient way/most easily understandable way for the client.

Let’s assume there are industries. We’ll use Sports. Underneath Sports, there are Projects. Within Projects, there are Team Members.

Initially, it makes sense to make a custom post type with type page (hierarchical) named “Industries”. Within CPT:Industries, I have a page “Sports”. When I create a project, I select “Sports” as it’s parent. I could perhaps use taxonomies to select Team Members.

The page URL structure would then be something like http://www.example.com/industries/sports/new-football-stadium

Here lies my problem, though. Team Members are more than just names, so it seems silly to make them a taxonomy. Each team member can be a member of multiple projects, and thus should have their own page to display their own information. So essentially, if I click the team members name on the fake URL above, it should be something like http://www.example.com/team/John-Smith. On John Smith’s page, it states his industry and a list of projects he’s worked on. This seems impossible just using a custom Taxonomy for selecting people on a project.

Obviously I could make a custom post type of “Team” and a team taxonomy, but I’d like to avoid double the work for the client when creating new items.

Furthermore, I’ve always found it a little sloppy selecting a parent in hierarchical custom post types. I’d like to have a link on the side bar that says “Add New Project” and select the Industry, instead of going to Industries -> Create New Page and select a parent within the Attributes metabox.

Essentially, I’d like at least two custom post types: “industries”, and “projects” where projects is always a child of industries, but they’re post types. Can post types have a parent/child relationship?

Alternatively, I could just create a “projects” custom post type, and make “industry” a taxonomy, however the industry is always going to have a landing page too, with a listing of projects within it, so I run into the same problem as the team members.

How would you architect this?

Thanks.

1 Answer
1

I believe that CPT-onomies may do what you’re looking for. The plugin allows you to use a post type as a taxonomy, so you would set up Team Members as a post type and include their post information, but then be able to use each post as a custom taxonomy as well.

As for the other issue, parent/child post types is another plugin issue. I haven’t tried Posts 2 Posts by Scribu, though I’ve heard good things about it, but I have tried Types. Both allow you to create relationships between post types. The example provided for Types is to have three post types: Cars, People, and Rental Agreements and use Rental Agreements to link Cars and People. My personal example was to make Signatures a child type of Posts.

Leave a Comment