There’s a few different ways to pull the venue info, for future reference you could use the venue view helper by first loading it within your template:
Then you have the functions within the ‘EEH_Venue_View’ class.
Or you can use the template tags we have available within EE:
espresso_venue_name()
Or if you want the EE_Venue object you can pull that from the event, so if you have a $post object, you can use:
$venues =$post->EE_Event->venues();
Which returns an array of venue objects (yes even if there is a single venue)
Then pull the single venues object from that:
$venue = reset($venues);
And finally, output name of the venue $venue->name();
The help classes do a lot of the above for you and also do a lot of conditional checking to try and pull the venue from the correct object and make sure you have a venue object before trying to return values from it.
Viewing 2 reply threads
The support post ‘How to echo venue name (Grid Add On)’ 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.