Skip Navigation

[Resolved] genealogy

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.

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 7 replies, has 1 voice.

Last updated by Minesh 1 week, 5 days ago.

Assisted by: Minesh.

Author
Posts
#2817580

Hello,
My request concerns a dog breeding website.
I would like to be able to create the genealogy of dogs with Toolset.
My intention was to create a “dogs” database with all the individuals and then, using Toolset relationships, link each dog to its father and mother.
However, Toolset relationships do not allow me to link one dog to another dog within the same CPT.
Do you have any ideas on how to get around this limitation and allow me to create the pedigrees?

#2817582

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

I would like to know what post-relationship you are using.

Have you checked the many-to-many post relationship?
- https://toolset.com/course-lesson/what-are-post-relationships-and-how-they-work/
- https://toolset.com/course-lesson/many-to-many-post-relationships/

Maybe you want to setup a relationship chain like => Country => State => City, for example, Grand Father => Father => Dog with one to many post relationship.

You may want to check any of the courses we offer that may help you as well:
- https://toolset.com/course/

#2817591
Toolset relation.jpg

I have a “dog” CPT with all dogs.
I wanted to create two relationships:
1 “father” relationship
1 “mother” relationship
In each of these relationships, I wanted to be able to choose in the “dog” CPT who is the father or mother of a dog.
But Toolset does not allow this (see attached image).

#2817915

Minesh
Supporter

Languages: English (English )

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

You can not have self-join post-relationship.

There should be Dog Father and Dog mother post types.

Maybe as you already have "Dogs" post type. You need create "Dog Father" and "Dog Mother" post types and clone all Dog posts using some script of plugin to "Dog Father" and "Dog Mother" post types.

Then later on, you should create one to many post relationship between:
- Dogs and Dog Father
- Dogs and Dog Mother

#2817921

What a great idea! Why didn't I think of that sooner? And for grandparents, do I duplicate again to create CPT grandfather and grandmother? It's handy if you need to update a record...
I thought relationships were meant to avoid unnecessary duplication of content.
Don't you have a more practical solution to offer?
I thought Toolset made it fairly easy to create just about anything...

#2817922

Minesh
Supporter

Languages: English (English )

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

What a great idea! Why didn't I think of that sooner? And for grandparents, do I duplicate again to create CPT grandfather and grandmother? It's handy if you need to update a record...
===>
Yes - you should also create CPT for grandfather and grandmother the same way.

I thought relationships were meant to avoid unnecessary duplication of content.
Don't you have a more practical solution to offer?
===>
No, I think this is the best solution I can think of. There is other but then it will need some custom code and will have some limitations as well.

I thought Toolset made it fairly easy to create just about anything...
===>
Yes, it is but its your requirement, you want the self join but there is no self join relationship supported by Toolset.

#2818011

How can I clone a post from the cpt dog and then transfer it to the cpt Dog father or Dog mother?

#2818040

Minesh
Supporter

Languages: English (English )

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

Well - You need to use plugins like WP ALL Export/Import for such a operation.

You can export the content of the post type in CSV format and later on try to import it to your additional post type like dog_father and dog_mother.

More info:
- https://toolset.com/course-lesson/how-to-import-content-into-wordpress-using-csv/