Hello, I am setting up a new site and am trying to decide the best way to structure the CPTs and relationships.
I have Rental Properties and each Rental Property has Units. A Unit is basically an apartment type, such as Swanky Penthouse, Tiny Studio, Industrial Loft. (For ease of discussion, let's say that in each Rental Property no two units are alike.) Units are unique to each building (don't need to compare Swanky Penthouses across the different properties, for example).
I think Rental Properties and Units both need to be posts of some kind, and not a taxonomy, because there is a lot of information and custom fields that are needed for each. Where I am undecided is whether I should use Types Relationships or a Custom Post Type with parent/child hierarchy.
It's a one-to-many relationship -- each Rental Property has multiple Units, but each Unit only belongs to one Rental Property. So the traditional CPT parent/child hierarchy would work in that regard. But, Rental Properties have a different set of custom fields than Units. (I do realize I can conditionally show/hide field groups based on whether it's a Rental Property or a Unit.)
My question is, are there advantages or disadvantages to using one of these over the other?
1. Native WP relationship: Create a Custom Post Type: Rentals. When you create a Rental post, you choose in the custom fields whether it's a Rental Property or a Unit. The remaining custom field groups conditionally show the proper set of fields for that option. Rental Properties are parent posts, and each Unit post is a child of one of the Rental Property posts, using native WP post hieararchy
2. Types Relationship: Create two Custom Post Types: Rental Properties and Units. Each have their own set of custom fields. Relationship between the two CPTs are created using Types Relationship.
I've built sites using both methods and I cannot remember why in each case the decision was made to go in one of these directions or the other. There will be associated taxonomies for both Rental Properties and Units, and searching/filtering across the two. Can someone please explain why one structure would be chosen over the other, or what limitations exist that should make me choose one method over the other? Many thanks for any insight you can give.
Note: While I realize each setup is unique, and I am asking you for advice on this specific setup, I am most interested in more general strategy and limitations. For example, I found your documentation of Custom Fields vs. Taxonomies very helpful because it included information such as "you can order posts by custom field values but not by taxonomies" and "displaying posts by taxonomy is faster than displaying them by custom fields." Thank you!