Hi, I’d like to add a simple conditional statement that will display a Google map ONLY when the event venue Address holds information (otherwise a blank map is displayed). I’m just not sure what variable I should be targeting, and would appreciate any help in setting this up.
Thanks for your help!
Hi Sidney, it’s actually within the ticket template; I currently have a section at the bottom of the ticket which displays the location (and google map) for the attendee’s convenience. It works fine, but in those cases where a venue is yet to be determined, obviously there’s no data to plug in, resulting in a blank google map. In those cases, I’d like the bottom section not to display at all (hence a conditional statement); is this possible?
Thanks so much for your help!
The function generating the map and link is espresso_google_map_link in includes/functions/main.php starting on line 949. It is an overrideable function, so you can copy the function to one of the following:
1 – Your theme’s functions.php file. It may get overwritten the next time you update your theme.
2 – The EE custom files add-on in the custom_functions.php file.
3 – Use this blank plugin to hold the custom function.
After the address assignment line, you can put in something like:
The support post ‘Conditional Statement for Event 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.
Support forum for Event Espresso 3 and Event Espresso 4.