Home › Forums › Front-end Issues › Prevent acf_form_head Being Added Twice › Reply To: Prevent acf_form_head Being Added Twice
ACF form head should not be run in the admin, normally.
The action I referenced acf/submit_form
is run during acf_form_head(). If this action has been done that means that acf_form_head() was already called somewhere else. There are other actions as well that could be used but this one seemed the most likely.
I would also check the the other thing.
if (!is_admin() && did_action('acf/submit_form')) == 0) {
acf_form_head();
}
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.