I assume we are talking about this case:
- Grandparent post type A
-- Parent post type B
--- Child post type C
In a single "Parent post type B" post, you are going to create a view querying posts of "Child post type C", and in this view's loop display "Grandparent post type A" information.
I have a personal project and I need to do post relationship like this.
1. Country
2. State - Many States in one country
3. Province - Many provinces in one state
4. City - Many cities in the province
5. Area - Many in cities
6. Street - Many streets in the city
7. House - Many houses in the street
Luo is on vacation. This is Minesh here and I'll take care of this ticket. Hope this is OK.
Well - Based on the structure you shared and after reviewing that, it seems you need mostly one to Many relationships between post types.
So, following relationship should be created based on your structure you shared:
- A country has many States
- States has many provinces
- provinces has many City
- City has many Area
- City has many street
- Street has many houses
Could you be specific with your exact post types and relationships. I can see you created four relationships:
-Cities Streets
- Countries Provinces
- Provinces Cities
- Streets Houses
Now, if you have issue to display the relationship content, could you please specify where exactly you are facing the issue? Could you please share problem URL and tell me what content you want to display.
I have set the next reply to private which means only you and I have access to it.
Below are the custom post type. Country related to State, State related to province and same street related to house. but when i create a view for house all previous post should show.
1 . Country
2. State - Many States in one country
3. Province - Many provinces in one state
4. City - Many cities in the province
5. Area - Many in cities
6. Street - Many streets in the city
7. House - Many houses in the street
Well - I suggest, Please create all required structure, post relationship as described or required, few related test connections (entries) and then should create a view and display your content.
Once you are ready with your post-relationship, content (data) and view and where to display it, please share problem URL and access details with your expected output requirement so that I can guide you in the right direction.