JPKCom ACF (Pro) Enable Shortcode — Guide & Tips
Output ACF field values via shortcode inside a WYSIWYG — installation and practical tips for JPKCom ACF (Pro) Enable Shortcode.
JPKCom ACF (Pro) Enable Shortcode enables the ACF shortcode that lets you display another field's value from within the WYSIWYG editor. It unlocks a capability that Advanced Custom Fields does not enable by default for security reasons.
Guide
Requirements
- WordPress 6.9 or newer (tested up to WordPress 7.1)
- PHP 8.3 or newer
- Advanced Custom Fields Pro (active)
Installation
- In your admin panel, go to Plugins → Add New and click Upload Plugin.
- Choose the plugin's ZIP file and click Install Now.
- Make sure Advanced Custom Fields is activated.
- Click Activate — the plugin takes effect immediately.
Usage
Once active, you can use the ACF shortcode inside a WYSIWYG field to display another field's value. See the official ACF shortcode documentation for the supported syntax and details.
The plugin does not just switch the shortcode on once, it keeps it on: the setting is filtered on every read, so a later change from elsewhere cannot quietly switch it off again. On block themes it additionally lifts ACF's separate restriction that otherwise limits the shortcode to post content, so [acf] also works in template parts, widgets and blocks outside the content flow.
If your ACF installation predates 6.3, the shortcode is already enabled and this plugin changes nothing.
When the shortcode still outputs nothing
Enabling the shortcode is necessary but not sufficient. ACF additionally requires that the field is registered (a bare post meta value is not enough — ACF resolves the name through its _fieldname reference row), that the field type supports bindings, and that the referenced post is publicly viewable. Previews need the publish_posts capability. When one of these is not met, the shortcode outputs nothing, silently.
Tips & Tricks
- Enable deliberately: ACF disables the shortcode by default — though only on installations first activated on ACF 6.3 or later. Both restrictions are hardening defaults ACF introduced on purpose. Only activate this plugin if you actually need the feature, and keep an eye on who is allowed to edit content with shortcodes. ACF's own output escaping is left untouched.
- Block themes since 2.0.9: Before that, the
[acf]shortcode simply produced nothing outsidethe_contenton a block theme — with no error and no log entry. Classic themes were never affected. Note that lifting this restriction deliberately widens the scope beyond post content. - Look up the syntax: The attributes the ACF shortcode accepts (e.g. field name, post ID, formatting) are documented on the ACF shortcode resource page.
- Verified against ACF Pro 6.8.6:
Requires Plugins: advanced-custom-fields-proresolves against the installed plugin folder even though ACF Pro is not on wordpress.org — only the "install dependency" link is unavailable. - Reproducible updates: Since version 2.0.3 the plugin uses secure self-hosted updates via GitHub with SHA256 checksums and runs with
declare(strict_types=1).
Further reading
- Source code on GitHub: https://github.com/JPKCom/jpkcom-acf-shortcode-enable
- API documentation (PHPDoc): https://jpkcom.github.io/jpkcom-acf-shortcode-enable/docs/
- ACF shortcode documentation: https://www.advancedcustomfields.com/resources/shortcode/
- This project's changelog