Sauter la navigation

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

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

Ce sujet contient 1 réponse, a 1 voix.

Dernière mise à jour par Mario Il y a 6 années et 5 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);