Answer the question
In order to leave comments, you need to log in
Why does acf_form create 2 records at once?
Hello. Made a form in the template for adding reviews to the site.
Working domain trimedia.isp.regruhosting.ru/testimonial for understanding
This is the archive page of the "reviews" post type. Under it, a separate template made archive-testimonial.php.
Accordingly, as written in the manual, before get_header I call acf_form_head ();
The form itself is in my popup, and its code is in the footer.php template, here is the code:
acf_form(array(
'post_id' => 'new_post',
'post_title' => true,
'new_post' => array(
'post_type' => 'testimonial',
'post_status' => 'draft'
),
'return' => home_url('thank-you'),
'submit_value' => 'оставить отзыв'
));
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question