Enable ACF Shortcodes

Since v6.3.0, Advanced Custom Fields (ACF) disables shortcodes by default. Use this snippet to enable them.

add_action( 'acf/init', 'set_acf_settings' );
function set_acf_settings() {
    acf_update_setting( 'enable_shortcode', true );
}

This will enable using ACF fields to display dynamic data in WYSIWYG, like

[acf field="field_name" post_id="123"]

Leave a Comment