ACF Theme Code Pro GPL
$4.49
ACF Theme Code Pro is an addon for Advanced Custom Fields Pro that generates theme code for your field groups and displays it directly in the ACF settings. Instead of writing registration code by hand
ACF Theme Code Pro is an addon for Advanced Custom Fields Pro that generates theme code for your field groups and displays it directly in the ACF settings. Instead of writing registration code by hand, you create fields, publish the field group, and copy the generated PHP from the plugin's screens. It is built by Hookturn with Ben Pearson and is aimed at developers who want to move field group definitions from the admin into theme files faster.
| Product | ACF Theme Code Pro |
|---|---|
| Version | 2.5.6 |
| Works with | WordPress 4.8.0+ / PHP 8.x+ |
| Tested up to | WordPress 6.3 |
| License | GPLv2 or later |
| Delivery | Instant ZIP download, 10 downloads, 365 days |
What ACF Theme Code Pro generates for a field group
Once you create some fields and publish a field group, the plugin produces theme code for that group. The settings screen tells you to select a location to see the relevant theme code, and you can copy it to the clipboard with the copy code buttons. The generated code covers the standard ACF variable types, including user variables, attachment variables, taxonomy term variables, comment variables and widget variables.
You can also add a Post or Page option to the Location Rules for the field group, which makes the relevant code available for that context. The code is displayed inside the ACF settings area, so you do not have to leave the field group you are working on to retrieve it.
Registering ACF Blocks and Options Pages from the plugin
Theme Code Pro includes a location registration tool that generates code for registering a new block or an options page. The block template screen walks through the steps: generate the code for registering a new block, add the block registration code to your theme, then select the new block in the Locations meta box on the field group page and update it. A block template file is provided with the settings and attributes, the block inner HTML, a flag for AJAX preview and the post ID the block is saved to.
The plugin also handles options page registration, and the interface includes a section for adding styles that use ACF values. When no layouts are found or no registered block is selected, the screens say so instead of producing empty output.
ACF 6 integration and the 2.5.6 fixes
Version 2.5.5 added a stylesheet that integrates all components with ACF 6 and updated the location registration tool UI and the scroll-to-code behaviour for ACF 6. Version 2.5.4 added support for ACF 6 and fixed a JS and CSS enqueuing bug on the Tools page. The current 2.5.6 release adds support for PHP 8.2, fixes the Gallery field, the Link field and the copy code buttons, and updates the metabox icon and notices.
ACF Theme Code Pro requires WordPress 4.8.0 and is tested up to WordPress 6.3. The download is a 0.1 MB zip with the pro, render and core folders.
What this build includes
| Code shown in the ACF settings | Generated theme code appears directly in the field group settings screens, so you can read and copy it without switching pages. |
|---|---|
| Copy code buttons | Copy the generated code to your clipboard from the settings screen using the built-in copy buttons. |
| Variables for every ACF context | Generate code for user, attachment, taxonomy term, comment and widget variables as well as standard field values. |
| Block registration code | Generate the code needed to register a new Gutenberg block, then select the block in the Locations meta box and update the field group. |
| Block template file | A template file is produced with the block settings and attributes, the inner HTML, an AJAX preview flag and the saved post ID. |
| Options page registration | Register ACF options pages from the plugin's registration tool rather than writing the registration call by hand. |
| ACF 6 styling | A stylesheet integrates the plugin's components with the ACF 6 interface, and the location tool UI is updated to match. |
| Translation ready | Full localization support with Polish, Dutch, Chinese (Taiwan) and German translations contributed by community translators. |
Installing it on a WordPress site
- Install Advanced Custom Fields Pro first, then upload the ACF Theme Code Pro zip through the WordPress plugins screen and activate it.
- Open a field group in ACF, create your fields, and publish the field group so the theme code is generated.
- Select a location to view the relevant code, copy it with the copy code buttons, and paste it into your theme files.
Latest changes
Version 2.5.6 adds PHP 8.2 support, fixes the Gallery and Link fields and the copy code buttons, and updates ACF 6+ styles, the metabox icon and notices.
Frequently asked questions
Does ACF Theme Code Pro work with ACF 6?
Yes. Support for ACF 6 was added in version 2.5.4, and version 2.5.5 added a stylesheet to integrate all components with ACF 6, updated the location registration tool UI and updated scroll-to-code behaviour for ACF 6. The 2.5.6 release also fixes ACF 6+ styles.
Is this the same build the developer ships?
The zip is a GPL build containing the same plugin files the developer ships, at $4.49. It has no vendor update channel and no vendor support desk, so updates and help come from your own WordPress setup rather than the developer.
Can I use it with WooCommerce and Elementor?
ACF Theme Code Pro is compatible with WooCommerce, so you can build custom product pages, and it works with Elementor to create custom layouts. Both rely on the field groups you define in ACF.
What WordPress version do I need?
The plugin requires WordPress 4.8.0 and is tested up to WordPress 6.3. Version 2.5.6 adds support for PHP 8.2, so it runs on current PHP versions.
Which languages are included?
Full localization support is in place, with Polish, Dutch, Chinese (Taiwan) and German translations contributed by community translators. The plugin's own strings are ready for further translation if you want to add your language.
What the GPL build means for you
This is the same archive the developer publishes, redistributed under the GNU General Public License: you get the working files for $4.49 with no vendor update channel and no vendor support desk. If you need automatic updates or a support contract, buy the official license from the developer.
| This GPL build | Official license | |
|---|---|---|
| Price | $4.49 one time | Vendor subscription |
| Automatic updates | No | Yes |
| Developer support | No | Yes |
| Number of sites | Unlimited | Depends on plan |
Browse the rest of the WordPress plugins category or the full shop. The licence text is at GNU GPL v2, and general documentation is at WordPress.org.
You must be logged in to post a review.

Reviews
Clear filtersThere are no reviews yet.