Home Forums Front-end Issues Save taxonomy on submit ACF Form


Save taxonomy on submit ACF Form

  • Hi!

    I have a acf_form on front-end and it’s working very well. It’s a CPT called “Recipes”.

    The user fills some fields and on submit, it’s being saved.

    Now I need to add a custom taxonomy to this post. They are already created in the admin and the user select it as a <select> field on the front-end.

    Recipe Title: Bread
    Description: Lorem ipsum…

    Category: <select>

    The actual code is:

    <?php acf_form(array(
    										'id'			=> '21',
    										'post_id'		=> 'new_post',
    										'new_post'		=> array(
    											'post_type'		=> 'recipes',
    											'post_status'	=> 'publish',
    											'post_title'	=> 'Recipe Title',
    										'return' => '%post_url%?see-recipe',
    										'submit_value'  => 'Create Recipe'
    									)); ?>

    There is nothing on my functions.php but it works as expected for now. Can anyone help me to implement this taxonomy field?

    Really appreciate the attention!

  • Sorry, wrong answer, I read too fast

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Save taxonomy on submit ACF Form’ is closed to new replies.