ACF Field Key Generator

Generate unique ACF (Advanced Custom Fields) field and group keys instantly in VS Code.
Features
- Generate
field_ keys for ACF field definitions
- Generate
group_ keys for ACF field groups
- Keys follow the exact format used by ACF Pro:
[prefix]_[hex_timestamp][random_hex]
- Multiple trigger options: Command Palette, Keyboard Shortcuts, Context Menu
- Automatically copies to clipboard AND inserts at cursor position
Usage
Command Palette
Open Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and type "ACF":
ACF: Generate Field Key
ACF: Generate Group Key
Keyboard Shortcuts
| Command |
Windows/Linux |
Mac |
| Generate Field Key |
Ctrl+Alt+F |
Cmd+Alt+F |
| Generate Group Key |
Ctrl+Shift+G |
Cmd+Shift+G |
Right-click in any editor to access:
- "ACF: Generate Field Key"
- "ACF: Generate Group Key"
Generated keys match the ACF Pro format exactly:
field_68775e5ca102e
group_59b2ab45699a0
Format breakdown:
field_ or group_ prefix
- 8-character hex Unix timestamp
- 5-character random hex suffix
Example
Working with ACF JSON files:
{
"key": "field_68775e5ca102e",
"label": "My Custom Field",
"name": "my_custom_field",
"type": "text"
}
Installation
- Open VS Code
- Go to Extensions (
Ctrl+Shift+X)
- Search for "ACF Field Key Generator"
- Click Install
Or install directly from VS Code Marketplace.
Requirements
Release Notes
1.0.0
- Initial release
- Generate field keys (
field_xxx)
- Generate group keys (
group_xxx)
- Command palette, keyboard shortcuts, and context menu support
- Clipboard and cursor insertion
License
MIT
| |