

The Field Code box under a field group of Advanced Custom Fields: the fields on the left, the code of the chosen field on the right, copied in one click.
Antwork Field Code is a code generator for Advanced Custom Fields and Secure Custom Fields. It adds a “Field Code” box under the settings of each field group, with the snippets that display the fields of the saved group in a theme template: the code of each covered field, chosen in the list of fields, coloured by WordPress’s own code editor, with a Copy button.
The code follows the documentation of Advanced Custom Fields: get_field() returns values that are not escaped, so every value is escaped for where it is printed (esc_html(), esc_url(), esc_attr(), wp_kses_post(), wp_get_attachment_image() for images), and nothing is printed when a field is empty. It follows the WordPress Coding Standards, runs on PHP 7.4 to 8.4, and names its variables after your fields.
It works with Advanced Custom Fields (free or Pro, version 6) and with Secure Custom Fields.
Repeater, Flexible Content, Gallery, Clone and field types added by other plugins show “This field type is not covered yet.”
The code reads the fields of the current post, inside the Loop of a template for posts, pages or custom post types. A field group shown elsewhere (an options page, a taxonomy, a user, ACF Blocks…) still gets its code, with a line that names the location that is not covered yet.
Antwork Field Code Pro is a separate plugin, sold at antwork.fr. It adds the code of Repeater, Flexible Content, Gallery and Clone fields, and of field groups shown on options pages, taxonomy terms, users, comments, attachments and widgets. Where it would apply, the Field Code box says so in one sentence that you can dismiss.
Have an idea for the plugin? Suggest it in the support forum, where bugs are reported too.
Privacy: this plugin makes no external request. It collects no data, adds no tracking and stores no option in the database, so there is nothing to clean up when you delete it.
Antwork Field Code is an independent plugin. It is not affiliated with or endorsed by Advanced Custom Fields or Secure Custom Fields.
If it saves you time, a review on WordPress.org helps other developers find it.
The code appears under the settings of each field group.
There is nothing to set up and nothing to migrate: the plugin stores no settings.