Skip Navigation

[Résolu] Connect field group to parent with php

This support ticket is created Il y a 5 années et 7 mois. 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.

This topic contains 1 réponse, has 1 voix.

Last updated by Mario Il y a 5 années et 7 mois.

Auteur
Publications
#1106372

I have parent cpt 'region' and child cpt 'province'. cpt province as custome field group for the parent 'region'.
Both cpt are importet in DB with wp_insert_post. So far, so good.
Now i want connect each province cpt as a custom field groups to its belonging parent 'region'.

I tried

toolset_connect_posts ('region-province', $region_post->ID, $province_post->ID);

Since i don´t know the name of relationship i guessed 'region-province', 'region' and 'province'. Nothing worked for me.

What i am doing wrong?
I followed all available documentations for apis.

#1106376

Solution was: toolset_connect_posts ('province', $region_post->ID, $province_post->ID);

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