Skip to content

Instantly share code, notes, and snippets.

@goldhat
Last active October 1, 2016 22:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goldhat/eac1fecf60c1d902aeef46193b2a9430 to your computer and use it in GitHub Desktop.
Save goldhat/eac1fecf60c1d902aeef46193b2a9430 to your computer and use it in GitHub Desktop.
ACF Render Shortcode Examples
[acf-render name="first_name"]
Basic example rendering a text field value. Field name is "first_name". Default template (text) will be used to render. No label will be shown.
[acf-render name="first_name" label=1]
Default template (text) will be used, Field label will be shown.
[acf-render name="first_name" post="89"]
Load the value of first_name field from post ID 89.
[acf-render name="first_name" template="custom-text"]
Use a custom template "custom-text". This template must be registered first using one of the options for custom template registration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment