WordPress plugin
ACF Theme Code PRO
ACF Theme Code PRO generates implementation code for ACF field groups and separate registration code for their locations. After you publish, edit, or update a field group, its code appears in the Theme Code section at the bottom of the Edit Field Group page. The code reflects the group’s field names and options; use the clipboard icons to copy relevant blocks into theme templates.
Code for fields and locations
ACF Theme Code PRO generates implementation code for ACF field groups and separate registration code for their locations. After you publish, edit, or update a field group, its code appears in the Theme Code section at the bottom of the Edit Field Group page. The code reflects the group’s field names and options; use the clipboard icons to copy relevant blocks into theme templates.
Field support in the PRO edition
The extension supports standard ACF fields and selected third-party fields. The PRO edition also works with these complex ACF PRO field types:
- Repeater
- Flexible Content
- Gallery
- Clone
ACF Blocks and Options Pages are supported as well. The generated code follows the official Advanced Custom Fields documentation and includes output escaping.
Register locations in ACF Tools
The Theme Code Location Registration Tool on the ACF Tools page generates code for registering field group locations, including more complex locations. Supported types for the PRO edition include:
- Block
- Options Page
- Widget
- Taxonomy
- Comment
- Attachment
- Current User
- User Form
From field group to template
- Create or edit an ACF Field Group.
- Configure the field names, options, and locations required by the project.
- Save or update the field group.
- Open the Theme Code section to review the generated implementation code.
- Use the clipboard controls to copy relevant code blocks into theme templates.
The code is tailored to the configured fields, which lets developers use it when building custom templates with standard ACF fields and supported PRO features.
Requirements
Use ACF Theme Code PRO on a WordPress site with Advanced Custom Fields or ACF PRO version 5.8.9 or higher. Install and activate ACF Theme Code PRO after the required ACF extension is available. Then create or edit a field group to access the Theme Code section. Use the ACF Tools page to generate location registration code.