ACF Compatibility Layer: get_field() and Other ACF Functions
Themes built for Advanced Custom Fields (ACF) or Secure Custom Fields (SCF) call template functions such as get_field(), have_rows() and get_sub_field().
Field Forge’s ACF Compatibility Layer defines the ACF template functions that themes use most (listed below). When Field Forge is active and ACF / SCF is not, the global ACF functions resolve to Field Forge’s storage. Your theme code keeps working unchanged.
What’s in the compatibility layer
Field Forge defines these ACF functions (a function is defined only if nothing else has defined it first):
Core field functions
get_field( $selector, $post_id = false );
the_field( $selector, $post_id = false );
get_fields( $post_id = false );
get_field_object( $selector, $post_id = false );
get_field_objects( $post_id = false );
update_field( $selector, $value, $post_id = false );
delete_field( $selector, $post_id = false );
Repeater and flexible content loop functions
have_rows( $selector, $post_id = false );
the_row();
get_row();
get_row_index();
get_row_layout();
the_flexible_field( $selector, $post_id = false );
Sub-field functions (inside repeater / group / flex loops)
get_sub_field( $selector );
the_sub_field( $selector );
get_sub_field_object( $selector );
Options page compatibility
// Both the 'options' and 'option' pseudo-IDs work
get_field( 'site_logo', 'options' );
get_field( 'site_logo', 'option' );
// Options pages are a Pro feature: without Pro these two register nothing
acf_add_options_page( $args );
acf_add_options_sub_page( $args );
User field compatibility
get_field( 'bio', 'user_123' );
Gutenberg block registration
acf_register_block_type( array(
'name' => 'hero',
'title' => 'Hero Section',
'render_callback' => 'render_hero_block',
'category' => 'theme',
'icon' => 'cover-image',
) );
Block registration is a Pro feature (PHP Blocks): acf_register_block_type() and acf_register_block() pass the call on to it, and on a site without Pro they do nothing.
These functions take the arguments shown. ACF’s $format_value and $load_value arguments are not part of them: values come back formatted the way Field Forge returns them.
How it works
When Field Forge is active:
- ACF’s global functions are defined by Field Forge via
function_exists()guards - Calls route to Field Forge’s storage (the custom
wp_fieldforge_valuestable) - Return values match ACF’s format — arrays, objects, strings, WP_Image / WP_Post / WP_User objects where appropriate
- No
$format_valueargument: the functions take the arguments listed above, and values come back formatted
If ACF is also active on the same site (during migration), Field Forge’s functions are not registered — ACF takes precedence. After you deactivate ACF, Field Forge’s versions take over. This means you can install Field Forge alongside ACF without conflicts during testing.
Why this matters
Migration without theme rewrites
Field Forge defines the ACF template functions, so theme code that calls them does not have to be rewritten.
Field Forge’s compat layer reduces migration to:
- Install Field Forge alongside ACF
- Run the field group + value importer
- Deactivate ACF
- Test the site — templates should render identically
- Field Forge is now serving the same data that ACF used to serve
For a theme that calls only the functions listed above, no template changes. Calls to functions that are not in the list (see “What’s NOT in the compatibility layer”) still need a rewrite.
Secure Custom Fields (SCF)
According to its WordPress.org listing (October 2026), Secure Custom Fields (SCF) was forked from Advanced Custom Fields and has the same function names. Field Forge defines the template functions by name, so theme code written for SCF that calls only them works with the same compatibility layer, and the importer reads SCF field groups the same way as ACF ones.
Third-party plugin compatibility
Plugins that integrate with ACF usually call ACF’s global functions. A plugin that only calls the template functions listed above gets Field Forge’s data. A plugin that calls other ACF functions, for example acf_get_field_groups() or acf_get_fields() (as the WPGraphQL for ACF plugin does), is not covered, because Field Forge does not define them.
acf_register_block_type() works
ACF’s block registration function is one of the most common ACF Pro features agencies rely on. Custom Gutenberg blocks registered via acf_register_block_type() keep working after migration, with the Pro add-on (PHP Blocks) active:
// This code works unchanged with Field Forge active instead of ACF
acf_register_block_type([
'name' => 'feature-card',
'title' => __('Feature Card'),
'render_callback' => 'my_feature_render_callback',
'category' => 'theme',
'icon' => 'star-filled',
]);
function my_feature_render_callback($block) {
$title = get_field('title'); // Works
$icon = get_field('icon'); // Works
// ... render HTML
}
What’s NOT in the compatibility layer
For full transparency, here is what Field Forge does not replicate from ACF:
- Field group functions
acf_get_field_group(),acf_get_field_groups()andacf_get_fields()are not defined - Some loop and sub-field functions
reset_rows()andupdate_sub_field()are not defined - The
$format_valueand$load_valuearguments of the functions above - ACF’s admin screensField Forge has its own visual builder with a different UI
- ACF’s hook and filter namesField Forge has its own, shorter set of hooks, prefixed
fieldforge/instead ofacf/(it firesacf/initso that theme code hooked there still runs) - ACF’s JavaScript API in the adminField Forge has its own
- Custom field types built with ACF’s field type classes: Field Forge has no API for adding a field type
For themes that call only the template functions listed above, none of these gaps matter.
Migration confidence
The compatibility layer reads these field types:
- Basic text, textarea, number, email, URL fields
- WYSIWYG fields with HTML
- Image and file fields (returns arrays matching ACF’s format)
- Select, radio, checkbox fields (with
format_valueparameter) - Date and time picker fields
- Repeater fields, including a repeater inside a row of another repeater
- Flexible content with multiple layouts
- Group fields
- Relationship and post object fields
- Taxonomy and user fields
- Options pages (both
'options'and'option'pseudo-IDs) acf_register_block_type()callbacks (Pro)
If you find a case where our compat layer behavior differs from ACF, it’s a bug we want to fix. Email support with details.
Ready to migrate without rewriting your theme?
The ACF compatibility layer is in the free Field Forge plugin and in the paid plans.