By clicking links to some companies on my blog, and making a purchase, I may earn a referral commission.
While I am affiliated with these brands, it has no influence over my opinions of them.
Posted: May 13, 2021
Dynamic Avada content from ACF Options page
When using Advanced Custom Fields with Avada, you might get lost figuring out how to pull dynamic content from your global options page.
Avada won’t pull global ACF data in the same way it does with on-page custom fields.
Using ‘Shortcode’ for the dynamic content
When selecting dynamic content in Avada’s Live Editor, you can pick Shortcode, it is under the category labeled Other.
Here’s the shortcode you will need to retrieve your global ACF options data.
Notice the use of options as the post_id.
[acf field="field_name" post_id="options"]
The shortcode above is will work anywhere on your site. For Avada in particular, you can use it as Dynamic content in the editor.
Here’s where it came handy for us. Using dynamic content from the options page, to assign a global phone number to a website.
In this case we made the button link to place a call too, by using tel: before the content.
This saved time as the phone number was bound to change later on. With a simple option, we could control content in Avada sitewide.