Posted: May 21, 2021 at 8:17 pm
|
Hello, I am trying to use Advanced Custom Fields to save a Zoom link and a Google Drive link to an event, so that they can be included the registration confirmation message template. This is my first time working with Advanced Custom Fields. I created a field called “zoom-link” and one called “google-drive-link” Looking at this post, I have tried the shortcode [EVENT_META_*zoom-link]. I have also tried the shortcodes listed in the ACF documentation, [acf field=“{$zoom-link}”] and [acf field=“{$zoom-link}” post_id="{$2566}"]. None of them have worked, either in the message templates or in the body of the event post. I’m not sure what I’m doing wrong… |
Hi there,
That looks correct from the screenshots, where are you adding that shortcode and how are you testing this? When you say it doesn’t work, what happens?
The messages system uses its own shortcodes, not the ‘normal’ WordPress shortcodes so those won’t work in the message templates although they should in the event post itself. How are you testing this? Are you leaving the brackets when using the shortcode or is the above to highlight the value? The shortcode usage should be something like:
The 2 screenshots posted are the same so I can’t confirm the event editor view, but I did just test adding a URL field using ACF to an event and then pulling the value into a message. Examples, Field: Event: Message template: Message generated: |
|
|
Thanks. I didn’t realize that the ACF shortcodes wouldn’t work in the message template. I just got the Event Espresso shortcode [EVENT_META_*zoom-link] to work inside the message template. I realized that it wouldn’t work in the Main Content block, but does work in the [EVENT_LIST] block. |
In short, only shortcodes created for the EE message system will work within the messages so it’s not just ACF but pretty much any 🙂
To explain this a little, each section has access to specific data. EVENT_LIST has access to the events related to the registration, as the EVENT_META shortcode is an event based shortcode, it needs access to the event object(s) to parse. If you click on the icon next to each individual section it shows the shortcodes available for the specific section clicked on. |
|
The support post ‘Advanced Custom Fields Integration’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.