I really only need a yes/no answer at the moment as I'm working on some CPT/Custom field/Relationships and want to get my dataset right.
If we start with a parent CPT which is related to a Child CPT which in turn is related to a grandchild CPT can any of those levels access field data from both antecedents and descendants ?
Example. Country/Region/Sub-Region/Town
Case 1 - Can I display the Country on a Town post
Case 2 - Can I display a field from the Town CPT within the Country
I'm trying to avoid duplicating data in all the CPTs so for example I don't want to (or don't think I need to) display the region data in the town CPT. I'm hoping I can get it via the sub-region which is the parent of the town.
Like I said I don't need any help doing it just yet - just need to know it's possible so I can get my dataset sorted out.
Hello. Thank you for contacting the Toolset support.
Yes - its possible.
Example. Country/Region/Sub-Region/Town
Case 1 - Can I display the Country on a Town post
- To display the great grand parent value on child post you can use the following method:
Case 2 - Can I display a field from the Town CPT within the Country
- To display the last child you need to loop through the child post using the view: