Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make…
About ACF Theme Code for Advanced Custom Fields
The ACF Theme Code plugin generates the code needed to implement Advanced Custom Fields in your themes, reducing development time and providing quality, flexible, and custom code. This free version supports ACF 6 and includes code for a comprehensive range of ACF field types.Screenshots

Frequently asked questions
What is the ACF Theme Code plugin?
The ACF Theme Code plugin automatically generates the code needed to implement Advanced Custom Fields in your themes.
What features does ACF Theme Code have?
ACF Theme Code reduces development time by displaying the code required to implement your fields when you publish, edit, or update an ACF Field Group. It also provides quality, flexible, and custom code based on the official Advanced Custom Fields documentation. Additionally, it offers comprehensive field support for all field types included in the free version of Advanced Custom Fields.
What additional features does ACF Theme Code PRO have?
ACF Theme Code PRO, the premium version of the plugin, supports all complex field types included in Advanced Custom Fields PRO, such as Repeater, Flexible Content, Gallery, and Clone. It also includes a Theme Code Location Registration Tool for registering locations like Blocks and Options Pages. Moreover, it supports more complex ACF Field Group Locations, a range of third-party fields, and offers other advanced features.
Which ACF fields are supported by ACF Theme Code?
ACF Theme Code generates code for various ACF field types and settings, including Text, Text Area, Number, Range, Email, URL, Password, Image, File, WYSIWYG Editor, oEmbed, Select, Checkbox, Radio Button, Button Group, True/False, Link, Post Object, Page Link, Relationship, Taxonomy, User, Google Map, Date Picker, Date Time Picker, Colour Picker, and Group.
What are the requirements for using ACF Theme Code?
ACF Theme Code requires Advanced Custom Fields or ACF PRO (version 5.8.9 or higher) to be installed.
Changelog
2.5.6
- Compatibility with WordPress 6.4
2.5.5
- Add new stylesheet to integrate all components with ACF 6
- Update scroll to code functionality to support ACF 6
2.5.4
- Add support for ACF 6
2.5.3
- Add full support for localization (i18n)
- Please let us know if you’re interested in helping translate ACF Theme Code into your language.
2.5.2
- Compatibility with WordPress 5.8.0
- Fix CSS and JS enqueue bugs
2.5.0
- Improve support for WordPress 5.4.
- Improve support for all field types included in ACF PRO 5.8.9 (including all their various settings).
- Improve codebase by syncing both free and pro foundations to facilitate faster development cycles and future features.
- Add escaping to code rendered to bring it in line with recent updates to ACF field documentation. See https://twitter.com/wp_acf/status/1181344882775875584.
- Add ‘Copy All’ fields button (previously only Theme Code Pro feature).
- Add various enhancements to code rendered for the following fields and field settings:
- Gallery field (return types Array, URL and ID)
- Image (return types Array, URL and ID)
- File (return types Array, URL and ID)
- Select (values Single and Multiple, return types Value, Label and Array)
- Checkbox (return types Value, Label and Array)
- Radio Button (return type Array)
- Button Group (return type Array)
- True / False
- Link (return types Array and URL)
- Post Object (values Single and Multiple, return types Post Object and Post ID)
- Page Link (values Single and Multiple)
- Relationship (return types Post Object and Post ID)
- Taxonomy (appearances Checkbox, Multi Select, Radio Buttons and Select, return types Term Object and Term ID)
- User (values Single and Multiple, return types User Array, User Object and User ID)
- Google Map
- Add Location UI and move location related upgrade notice to code block
- Fix issue with location related upgrade notice where it wouldn’t show if only Options location was selected.
1.4.1
- Compatibility with WordPress 5.2.2
1.4.0
- All ACF v5 Free Fields Supported including: Group, Button, Range and Link fields.
- Fix: Bug with locations section on PHP 7.2
1.3.2
- Fix: Updated clipboard.js & bug fix for the copy to clipboard feature
1.3.1
- Fix: Updates to array count functionality for PHP 5.4
1.3.0
- Core : Support for ACF Pro when bundled in a Theme
- Fix : HTML output by the File field is now valid
- Core : Notice for location rule support (now in ACF Theme Code Pro)
1.2.0
- Core: Quicklinks feature with anchor links to the relevant theme code block
- Core: Notice updates & various bug fixes
1.1.2
- Fix: Use the_sub_field method for nested File fields with return format URL
1.1.1
- Field: Post Object field now works correctly for ACF 4
- Core: Various internal code improvements
1.1.0
- Fields: All field formatting improved inline with ACF Theme Code Pro
1.0.0
- Core: First version
