Posted: December 30, 2013 at 2:51 pm
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. | |
Hey Angela, | |
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? | |
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: if (empty($address)) return ''; | |
Thanks Sidney! Much appreciated :) | |
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.