[Resolved] Looking for a way to display CPT parent and children as an org chart

This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Our next available supporter will answer your ticket in about 5.66 hours from now. Thank you for your understanding.

This thread is resolved. Here is a description of the problem and solution.

Problem: How to programmatically create an Org Chart. This would be based on Parent/Children CPTs.

Solution: Toolset does not have any such feature to create an organizational chart, this will require pure custom coding apart from listing the parent/child posts. Below are some hints:

1. First you will need to create relationship between parent/child posts and set them as one-to-many relationships.

2. And then display the relational data on a page using Views, both these are explained here in detail: https://wp-types.com/documentation/beyond-the-basics/post-relationship-concepts/implementing-one-to-many-relationships/

3. After that you will need to style the relational data using pure html and css. Like its built here as examples (the sample code is also provided here): https://codepen.io/danyadsmith/pen/yNpqav https://bootsnipp.com/snippets/eN3Q8

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by  Gerard 2 months, 1 week ago. The support staff assigned to this topic is Noman.

Viewing 3 posts - 1 through 3 (of 3 total)
Author
Posts
#576319

Hi,

I'm asked to programmatically create an Org Chart. This would be based on Parent/Children CPTs.

I could really use any pointers and advice if you have any. 🙂

Thank you

#576445

Noman
Forum moderator

Supporter languages: English (English )

Supporter Timezone: Asia/Karachi (GMT+05:00)

Hi Gerard,

Thank you for contacting Toolset support. Toolset does not have any such feature to create an organizational chart, this will require pure custom coding apart from listing the parent/child posts. Below are some hints:

1. First you will need to create relationship between parent/child posts and set them as one-to-many relationships.

2. And then display the relational data on a page using Views, both these are explained here in detail:
https://wp-types.com/documentation/beyond-the-basics/post-relationship-concepts/implementing-one-to-many-relationships/

3. After that you will need to style the relational data using pure html and css. Like its built here as examples (the sample code is also provided here):
hidden link
hidden link

We cannot consult much on custom code as per our support policy (https://wp-types.com/toolset-support-policy/) . For this, you can contact Toolset recommended service providers to further discuss the custom approach. We have some recommended list of service providers here if you would like to take a look: https://wp-types.com/consultant/

Thank you

#576632

I'm sorry, I thought I was posting in the community forums.. :/

Thanks,

Viewing 3 posts - 1 through 3 (of 3 total)