Support

Account

Home Forums Front-end Issues How Update a post in front-end with acf (acf_form) Reply To: How Update a post in front-end with acf (acf_form)

  • Thank you, John
    It’s my crazy to forgot to use the acf_form() in a while loop to update a specific post, also you’re right I forgot to pass the post ID to the action too.
    Here is my complete code to update a specific post:

    while ( $author_posts->have_posts() ) : $author_posts->the_post();
    
        acf_form(array(
            'post_id'       => get_the_ID(),
            'field_groups'	=> array( 15 ),
            'post_title'    => false,
            'post_content'  => false,
            'submit_value'  => __('Update meta')
        ));
        endwhile;