Skip Navigation

[Resuelto] Connect field group to parent with php

This support ticket is created hace 6 años, 2 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

Etiquetado: 

Este tema contiene 1 respuesta, tiene 1 mensaje.

Última actualización por Mario hace 6 años, 2 meses.

Autor
Mensajes
#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);