Skip to content

Instantly share code, notes, and snippets.

@clarklab
Last active April 9, 2019 13:22
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save clarklab/795daeb56fcddd921f9400bfa6b6f2e0 to your computer and use it in GitHub Desktop.
Save clarklab/795daeb56fcddd921f9400bfa6b6f2e0 to your computer and use it in GitHub Desktop.
Shortcodes with Advanced Custom Fields
add_filter('acf/format_value/type=textarea', 'do_shortcode');
@clarklab
Copy link
Author

clarklab commented Jun 7, 2016

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.

@623145
Copy link

623145 commented Mar 14, 2018

hdghdhgdhdhdh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment