Created
June 5, 2019 10:58
-
-
Save wischli/9db791f2069ca4713e49cd4db752a0e4 to your computer and use it in GitHub Desktop.
Wordpress enable shortcode rendering for AFC values
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// enable shortcode rendering for values of types text and textarea (type array or object would lead to an error) | |
// more information: https://www.advancedcustomfields.com/resources/#filters | |
add_filter('acf/format_value/type=textarea', 'do_shortcode'); | |
add_filter('acf/format_value/type=text', 'do_shortcode'); | |
// if you wish to also enable shortcode rendering for the title add these two lines | |
add_filter('get_the_title', 'do_shortcode'); | |
add_filter('the_title', 'do_shortcode'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment