I have a question regarding Many-to-Many postrelationships.
I want to create catalogue of people with relationships.
So, each person could have multiple persons as parents and multiple persons as childs. As in real life. For example:
Person 1 has Father - Person 2, and Mother - Person 3. In the same moment Person 1 has children - Person 4 as Son and Person 5 as Daughter.
So, then I try to create this kind of database structure, I find that there is no possibility to create some intermediate post (e.g. PersonInRelationship) type with one Post Type (e.g. Person) both as child and parent.
So, could you help me to solve this case in some most efficient way?
I would create a Post Type (Persons) and add as example Person One.
Descendants of this person is a Child Post Type to the Person (Children of the person)
And another Post type, parent of Person, is used to connect Father, Mother, Grandparent or so of that person.
So in the end you have this structure:
- Parents or other
-- Person
--- Children
To connect many Persons to a Children you can setup a post type "relationship" that is child to both of them.
This then allows you to connect several Children to Several (also same) parent.
https://toolset.com/documentation/user-guides/many-to-many-post-relationship/
The same can be done between Person and Parents.