Turn the [acf] Shortcode Back On
Re-enables Advanced Custom Fields' own [acf field="..."] shortcode, which ACF 6.3 switched off by default for security.
Opens WPIDE on
Code
add_action( 'acf/init', function () {
if ( function_exists( 'acf_update_setting' ) ) {
acf_update_setting( 'enable_shortcode', true );
}
} );
Notes
Only turn this on if you trust everyone who can write content, since the shortcode can read any field of any post.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.