Add ACF fields to customize an Event
-
Hi,
I added 2 custom fields to the Event post type using ACF : https://cloud.tonton.ca/332p13313G47
Now I want to display them on the frontend in the Stream template :
So I created a custom theme based on gamma in my wp-content/themes-ai1ec/my-theme (debug is enabled)
I added the stream.twig from Vortex in : my-theme/twig/stream.twig
I tried to change my Stream.twig file and I see my modifications on the frontend so I’m sure it’s currently used.
Based on this Article about “ACF + Twig” https://github.com/jarednova/timber/wiki/ACF-Cookbook, I’ve added the following lines in my stream.twig:
<div class=”ai1ec-event-description”>
My CF1: {{event.facebook_event_url}}
My CF2: {{event.get_field(‘facebook_event_url’)}}
{{ event.post_excerpt | raw }}
</div>But I can’t get the content from my facebook_event_url custom field and display it on the front… the frontend looks like this: https://cloud.tonton.ca/19233J313w32
There is this unsolved issue about this on your public forums : https://time.ly/forums/topic/accessing-custom-fields/
So, could you help me to figure a way to display custom field on the frontend ?
Thank you!
j.
- The topic ‘Add ACF fields to customize an Event’ is closed to new replies.