ACF fields creating a new post and adding a category

I’m using ACF fields and I’m creating a new post, when I try and add the new post to a category it creates a page tag instead any ideas?

<?php
acf_form(array(
‘post_id’ => ‘new_post’,
‘field_groups’ => array(92), // Used ID of the field groups here.
‘form’ => true,
‘new_post’ => array(
‘post_status’ => ‘private’,
‘post_type’ => ‘post’,
‘post_title’ => $_POST[“acf”][‘field_5d4ee1249329f’],
‘post_engine_number’ => $_POST[“acf”][‘field_5d500098b573a’],
‘post_category’ => $_POST[“acf”][‘field_5d4ee1249329f’]
),
‘return’ => ‘%post_url%’,
‘submit_value’ => ‘Submit’
));
?>

Read more here:: ACF fields creating a new post and adding a category

Leave a Reply

Your email address will not be published. Required fields are marked *