Hey all,
I’m having am issue with acf_form. I’m trying to update a custom post type from a different page. The custom loop finds a single “business” post from a user.
<?php
$current_user = get_current_user_id();
$args = array(
'post_type' => 'business',
'meta_key' => 'user_id',
'meta_value' => $current_user,
'posts_per_page' => 1
);
$posts = get_posts( $args );
if( $posts ): ?>
<?php foreach( $posts as $post ): setup_postdata( $post );
acf_form (array ('post_id' => get_the_ID()));
endforeach; ?>
<?php wp_reset_postdata(); ?>
<?php endif; ?>
All the fields show but it won’t update on the frontend, I can update on the backend without issue. (acf_form_head(); is at the top of the template.)
Not sure what I’m missing but it’s left me scratching my head. Thanks!