Some of my events will be “Residential” meaning that the ticket price includes a room, bed and six meals. I have added “Residential” as a custom field to each venue. I want to be able to show this value in the event description. How do I pull a custom field from an event venue into the event description?
It depends on where exactly within the event details you want to output the custom field as to how you do this.
The venues are custom post types so you can pull the custom fields in the same way you would any other post if preferred, for example you can use ACF and then use the the [acf field] shortcode, passing the post_id of your venue.
To add your own shortcode that pulls in custom fields trough shortcodes.
Another option is to use the hooks available within EE that are fired during the output of the event details, for example the AHEE_event_details_before_venue_details passes the $post, so from that you can pull the event and its venue, then the custom field from the venue.
The support post ‘Displaying custom field in event description’ 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.
Support forum for Event Espresso 3 and Event Espresso 4.