0

Updated Post
'update_field' Function is Acf Plugin

$supplier_one = 'my supplier';
$supplier_two = 'my supplier TWO';
$post_id_one = 555;
$post_id_two = 556;

update_field('suppliers', $supplier_one, $post_id_one)
update_field('suppliers', $supplier_two, $post_id_two)

This code works for post object?
My other question is how to send posts to custom taxonomies with wp_insert_post

My Code for Wp_insert_post

$insert_post = array(
    'post_status' => 'publish',
    'post_type' => 'products',
    'post_title' => 'my post title',
    'tax_input' => array( 'category-products' => array( 'several' ) ) /// Category for post_type products
);
wp_insert_post($insert_post);
2
  • What is update_field()? It's not WordPress core function. Also please ask separate questions for separate issues.
    – Rarst
    Sep 17, 2013 at 12:48
  • Sorry bro, updated.
    – Raank
    Sep 17, 2013 at 12:54

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.