Home › Forums › Front-end Issues › acf_form() always creates two posts › Reply To: acf_form() always creates two posts
I wanted to share my recent experience with this very same problem. No matter what I tried, any front-end form I created with acf_form was creating duplicates. I’ve worked with ACF Pro for a long time and had never run into this problem on other projects.
Based on the advice here, I tried switching themes, and the problem stopped. So I knew something was up with the custom theme I’d built. I finally found the problem by creating a blank new theme, then rebuilding the theme file-by-file to find the exact template file that caused the error.
FINALLY I discovered that the problem started when I added footer.php. After investigating that file, I noticed that ‘<?php wp_footer(); ?>’ was missing before the closing body tag. Adding that immediately fixed the problem.
Missing the call to wp_footer() seems to have been the culprit in my case. Hopefully this helps someone else out there.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.