Support

Home Forums Event Espresso Premium Advanced Custom Fields Integration

Advanced Custom Fields Integration

Posted: May 21, 2021 at 8:17 pm


salvi

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…

ACF field

event editor


Tony

  • Support Staff

May 25, 2021 at 6:17 am

Hi there,

Looking at this post, I have tried the shortcode [EVENT_META_*zoom-link]

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?

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.

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:

[acf field="zoom-link"] or [acf field="zoom-link" post_id="2566"]

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:
https://monosnap.com/file/NmlJIrrp6kOtnTzvtEwpOQjOHTvBsv

Event:
https://monosnap.com/file/dVfa1H0rw8qGYbu8RVomJ1575If1pR

Message template:
https://monosnap.com/file/htf4T5KcxoCB6AGMhy5UFxlQvAZasy

Message generated:
https://monosnap.com/file/VqtJlS8AAIfi3ScMJlosvOkm4rrQtJ


salvi

May 25, 2021 at 7:16 pm

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.


Tony

  • Support Staff

May 26, 2021 at 2:45 am

I didn’t realize that the ACF shortcodes wouldn’t work in the message template.

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 🙂

I realized that it wouldn’t work in the Main Content block, but does work in the [EVENT_LIST] block.

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.

Event Espresso