Last active
April 9, 2019 13:22
-
-
Save clarklab/795daeb56fcddd921f9400bfa6b6f2e0 to your computer and use it in GitHub Desktop.
Shortcodes with Advanced Custom Fields
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
add_filter('acf/format_value/type=textarea', 'do_shortcode'); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can filter ACF meta data by field type (like only the textarea fields you've already got in place) to allow shortcodes with the do_shortcode filter. Just add the above line to your functions.php (or wherever you like to do your dirty work).
Bonus points: filter the field output again and again for other things, like rendering Markdown.