Support

Home Forums Event Espresso Premium EE4 Single event – Genesis – Add ACF field for Venue

EE4 Single event – Genesis – Add ACF field for Venue

Posted: January 15, 2016 at 9:09 am

Viewing 2 reply threads


JacquesMivi

January 15, 2016 at 9:09 am

Hi

Configuration : EE4 + Genesis + ACF plugin.
On ACF I got “venue_custom_transport” associate at espresso_venues. I can display it in the single venue page :

content-espresso_events-venues.php
Transports : <?php echo get_field('venue_custom_transport'); ?>

Bu when I try on the event, nothing appear

content-espresso_events-venues.php
`<?php espresso_venue_address( ‘inline’ ); ?>
Transports : <?php echo get_field(‘venue_custom_transport’); ?> `

Have you an idea ?
Thanks a lot


Josh

  • Support Staff

January 16, 2016 at 8:17 am

get_field() takes a second parameter for the post ID. In the case of displaying an event Custom Post type, you’ll need to specify the venue’s post Id in the call to get_field().

http://www.advancedcustomfields.com/resources/get_field/


JacquesMivi

January 16, 2016 at 9:45 am

Yes perfect. Final solution :

<?php $VNU_ID = espresso_venue_id( $post->ID ); ?>
<?php echo get_field(‘venue_custom_transport’, $VNU_ID); ?>

Viewing 2 reply threads

The support post ‘EE4 Single event – Genesis – Add ACF field for Venue’ 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