acf_form_head()


目录

Description

Used to process, validate and save the submitted form data created by the acf_form() function. It will also enqueue all ACF related scripts and styles for the form to display correctly.

This function must be placed before any HTML has been output, preferably above the get_header() function of your theme file.

Parameters

acf_form_head();

Example

This example demonstrates a basic acf_form() to edit the current post being viewed.

<?php acf_form_head(); ?>
<?php get_header(); ?>

    <div id="primary" class="content-area">
        <div id="content" class="site-content" role="main">
            <?php acf_form(); ?>
        </div>
    </div>

<?php get_sidebar(); ?>
<?php get_footer(); ?>

Actions & Filters

The following actions and filters are provided to customize the submission process.

Changelog


版本号 #1
由 壳壳虫 创建于 2026-08-29 15:44:03 UTC
由 壳壳虫 更新于 2026-08-29 15:44:03 UTC