Skip Navigation

[Resolved] Is it safe to create Relationships and add custom fields to them later?

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

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Karachi (GMT+05:00)

This topic contains 4 replies, has 2 voices.

Last updated by hamidM 4 years, 6 months ago.

Assisted by: Waqar.

Author
Posts
#1371175

Tell us what you are trying to do?

I want to create so many relationships but currently have no idea about Relationship custom fields. I guess in future I will need to add some custom fields to Relationships but not now. Can I safely add custom fields (AND/OR intermediary post types) to my Relationships in future without losing any sort of data? OR I should consider all possible custom fields (AND/OR intermediary post types) before creating new Relationships?

Thank you in advance.

Is there any documentation that you are following?
No.

Is there a similar example that we can see?
No.

#1371263

Waqar
Supporter

Languages: English (English )

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

Hi Hamid,

Thank you for contacting us and I'd be happy to assist.

It is possible to safely attach custom fields to the intermediary post types (resulting from post relationships) later, without any drawback.

You'll find its option at bottom of the relationship edit screen.

Example screenshot:
hidden link

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

regards,
Waqar

#1371327

Dear Waqar,
Thank you for your quick reply. What you say is I have to create intermediary post types when creating relationships? Without creating intermediary post types in the time of creating relationships, I will encounter problem?
I mean I am looking to create NO intermediary post types when creating these relationships. Because I don't know the need for custom fields (and of course intermediary post types) right now.
Please help!

#1371353

Waqar
Supporter

Languages: English (English )

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

Hi Hamid,

Thanks for writing back and sorry if my earlier message resulted in some confusion.

Here are some key points to remember, which will make this more clear:

1. There are 3 types of post relationships

a). One-to-One
b). One-to-Many
c). Many-to-Many

You'll find the details about these relationship types and how to select the right one, in this guide:
https://toolset.com/documentation/post-relationships/

2. Intermediary posts and custom fields can only be created, with relationships that are of type "Many-to-Many".

3. It is not necessary/compulsory to create Intermediary posts and custom fields at the time of creating a Many-to-Many relationship and both can be added later.

4. However, even if you haven't decided or finalized the custom fields for the Intermediary post, it would be a good idea to create the Intermediary post, at the time of post-relationship creation anyway. This is because having an intermediary post type won't have any drawbacks.

But if some posts are joined through that post-relationship and an Intermediary post type is attached later, then the entries for those existing connections won't be included in that Intermediary post type, which is a drawback.

5. Attaching the custom fields to the intermediary post type later, won't have any drawbacks.

So in summary, in your situation, I'll recommend adding your post-relationships choosing the right type and if any of those is a many-to-many relationship, do turn on the option to create an intermediary post type.

As for the custom fields for the intermediary post types, you can leave them for later, and add them only when they are needed.

regards,
Waqar

#1371455

My issue is resolved now. Thank you Waqar!
Many thanks

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.