Skip to content

Instantly share code, notes, and snippets.

@clarklab
Last active April 9, 2019 13:22
Show Gist options
  • Select an option

  • Save clarklab/795daeb56fcddd921f9400bfa6b6f2e0 to your computer and use it in GitHub Desktop.

Select an option

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

clarklab commented Jun 7, 2016 •

Copy link
Copy Markdown
Author

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

623145 commented Mar 14, 2018

Copy link
Copy Markdown

hdghdhgdhdhdh

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