i try to create a wordpress post by prog.
First, i use WP_insert_post
to create the post, and it return me the id of the post just created.
After that, i want to add information to the custom field on the post, so i use the ID and add_post_meta like that:
add_post_meta( $post_id, 'info', 'This is my value' );
For a WYSIWUG Editor or textarea or a textfield ACF, it working fine.
But i also have a relationship ACF and, i try with add_post_meta
like for the textarea, but it not working!
How can i make add_post_meta
work with relationship ACF?