Skip Navigation

[Resolved] Split: Converting HTML page to a dynamic page

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.

Author
Posts
#2408277

Waqar,

I think i've somewhat figured out the issue above... I'm steadily getting it.

Do you see how this page is made... hidden link
It's all HTML, done a long time ago. ... no database or backend.

I'm trying to rebuild it with a backend to better manage the info. My dream would be to create all entries as descendants and then go in after everyone is entered and attach their relationships to each other. example: Mother: (choose descendant) Father: (Choose Descendant) Children: (Choose Descendant).... what I came to understand is that you can't choose relationships from the same field or if it's possible it requires some coding. Would you be able to quote a price for this or help get it done? I think in the end, it will be the best way to do it, instead of how I have it now... refer to Descendants

I created this page: hidden link
so that other admins can help populate and fill in content, then I will go in the WordPress admin view and clean up and validate the content.

Please let me know if there's a more efficient way of doing this?

#2408295

Waqar
Supporter

Languages: English (English )

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

Hi,

Your observation is correct and Toolset doesn't support creating post relationships, between two same post types.

In this case, it would be better to create two select type fields "Father" and "Mother" for the "Descendants" post type and populate the options of those fields, using the "wpt_field_options" hook:
https://toolset.com/documentation/programmer-reference/types-api-filters/#wpt_field_options

You'll find the example of the code snippet for a similar requirement, in this forum reply:
https://toolset.com/forums/topic/cpt-call-field-in-a-second-cpt/#post-2207723

As a result, the user will see the same "Descendants" posts as the option to choose from in the "Father" and "Mother" fields and the ID of the select post will be saved as the value in that respective custom field.

And if you've stored the correct father and mother information with each "Descendants" post, you won't need to store children's information separately. The children's list of a particulate parent can be created using a post view, by filtering by the father/mother custom field value.
(e.g. where the father is X or the mother is Y)

I hope this helps and please let me know if you need any further assistance around this.

For more personalized assistance around custom code, you can also consider hiring a professional from our list of recommended contractors:
https://toolset.com/contractors/

regards,
Waqar

#2412431

My issue is resolved now. Thank you!