Navigation überspringen

[Gelöst] Using intermediary posts in other relationsships

This support ticket is created vor 4 Jahren, 12 Monaten. 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.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Dieses Thema enthält 1 Antwort, hat 2 Stimmen.

Zuletzt aktualisiert von Nigel vor 4 Jahren, 12 Monaten.

Assistiert von: Nigel.

Author
Artikel
#1436147

I am trying to use an intermediary post type in other relationsships. Here is the scenario:
Events<<Instances>>Locations (m:m relationship with intermediary post type)
Now, I would like to
- add taxonomies to "instances"
- use "instances" in another relationship
Apparently this is restricted for intermediary posts. Why is that the case? Is there a way to allow it or a workaround?
Thanks for the help!

#1436189

Nigel
Supporter

Sprachen: Englisch (English ) Spanisch (Español )

Zeitzone: Europe/London (GMT+00:00)

Screenshot 2020-01-02 at 14.47.21.png

Hi there

You are right that intermediate posts cannot be used in other relationships, it is a core limitation, and there isn't any kind of workaround that can facilitate it.

It is also the case that taxonomies are restricted (as can be seen in the screenshot).

When the API was designed the intermediate post type was envisaged to be used exclusively as a container for relationship custom fields.

If you wanted to use them more like typical custom post types, you could try replacing your M2M relationship with two one2M relationships, where the "one" in each relationship was the same post type that served as the intermediary but which could also be used as an intermediate post type of some other relationship (and which could also have taxonomies assigned).