Sauter la navigation

[Attente de la confirmation de l'utilisateur] Write Post Reference value

This support ticket is created Il y a 2 jours et 3 heures. 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

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

Dernière mise à jour par Minesh Il y a 1 jour et 17 heures.

Assisté par: Minesh.

Auteur
Publications
#2807341
Annotation on 2025-04-30 at 01-17-26.png

Hi, how do I write a value on a Post Reference custom field?

Tried with

update_post_meta($post_id, 'wrk-worker', $worker_id);

but it doesn't save anything

Thanks.

#2807377

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

What if you try to use the post relationship API function: toolset_connect_posts
=> https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/#toolset_connect_posts

toolset_connect_posts( 'wrk-worker', $post_id, $worker_id);