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;
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.