Skip Navigation

[Resolved] Design of the child post

This support ticket is created 6 years 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.

This topic contains 2 replies, has 2 voices.

Last updated by mikeB-14 6 years ago.

Author
Posts
#1186857

Hi
I have a parent post type called Planner Events
I have a primary field called IDX_CHANTIER
The other fields are things like event date , Consultant , Task, etc.

I have a child post type called Delegates
This will have First Name , Last Name , delegate Email, and attended checkbox.

In a normal relational database, you would have a unique id, for each delegate and a foreign key called IDX_ChantierID.

In toolset post-relationship, do I need the foreign key?.
Secondly I do not need the post title or post content for the delegate post type.

What is the correct way of doing this ?

Thanks
Tony Gilpin
email address : tony.gilpin@wolterskluwer.com

#1187290

Well, I do not know what your foreign key does, or why you would need it, so I cannot tell if it's needed with Toolset, however, in Toolset it's just like with any other Tool.

Every single Post has a unique ID. This is granted by WordPress.
Every single relationship also has an ID, and each related Post as well has such a unique ID.
Even each field you add will be connected to that unique ID with the unique slug that field has.

To remove post titles or other parts of the "default" look of a post edit screen you can follow this DOC:
https://toolset.com/documentation/user-guides/create-a-custom-post-type/#choose-which-sections-to-display

Note that if you remove the Post title then some random title is generated for you by WordPress.
I hence (for human readability) suggest keeping the title.

If you need to get data from your related posts with code, to eventually send it to some 3rd party API or similar, I suggest having a look at the Toolset Relationships API
https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/

#1187433

My issue is resolved now. Thank you!