Skip Navigation

[Resolved] Hierarchical display of parents and children in post type

This support ticket is created 4 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by Minesh 4 years, 1 month ago.

Assisted by: Minesh.

Author
Posts
#1799385
Hierarchy.PNG

I have created a hierarchical post type, that can be up to 7 layers deep. I want a content template that will display:

Breadcrumbs:
1) Clickable List of Grandparents, Parents, etc.

Content:
1) The Title of Current Page
2) A collapsible list of children, grandchildren, etc

I have submitted a picture below. Currently, I am using different custom post types with relationships for each of the parents, children, etc (e.g. Subtitle post type, Chapter post type, subchapter post type, etc.). This is becoming a problem because there are chapters and subchapters with the same names and it is hard to pick the relationship.

I would like to move to a single hierarchical post type, but I need to have the display like the one attached. Some will go 5 layers deep and some will go 7 layers deep.

How can I create one content template that will show all of the various parent-child relationships in a collapsible form like the one attached? I paid a developer to help write the list you see attached, and I was hoping I could do it myself this time - with your help of course - smile.

Thank you for your time.

#1799837

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

You will require to use the nested views in order to display the hierarchical post structure.

If you can share problem URL and access details where you want to list such hierarchical post structure and for what post type, once I review your post type structure I will be able to guide you in the right direction.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#1803579

Let me play around with the relationships a bit. I saw that the new Blocks 1.3 allows for new post relationships. Essentially, I was trying to see if there was a way display a view with Children, Grandchildren, Great-Grandchildren, etc. without having to do nested views. Sometimes I don't know how many generations there will be, so I was hoping for a simple solution without nesting view within view within view. I will update my staging site and send additional information this weekend if I can't think of better logic. Thank you.

#1804003

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok sure - Please let me know if you will require further assistance.