[Resolved] The Events Calendar / Venue Map on Single Event Template
This support ticket is created 2 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
I'm using Toolset to create a single event template for The Events Calendar. However, I'm struggling to get the Venue Location to show.
The Events Calendar plugin stores Venues as a separate post type, and links to the venue post using the field '_EventVenueID'. So I've used this as a basis to get Venue data into the Single Event template - e.g. [wpv-post-field name='_VenueCity' id="[wpv-post-field name='_EventVenueID']
However, I'm struggling to get a map to show with the Venue Location. Using the map block doesn't appear to give any usable options so I'm thinking a shortcode approach is best. I tried something like this for the marker but it doesn't appear to be working - [wpv-map-marker map_id="my-map" marker_id="my-marker" lat="[wpv-post-field name='_VenueLat' id="[wpv-post-field name='_EventVenueID']" lon="[wpv-post-field name='_VenueLng' id="[wpv-post-field name='_EventVenueID']"][/wpv-map-marker] - because I think there are two many levels of nested shortcodes?
Thank you for contacting us and I'd be happy to assist.
During my tests, I was able to show the venue's map marker on the single event page, using the following steps:
1. I registered a custom shortcode, which first gets the current event's venue ID and then extracts the address items from its custom fields to return a complete formatted address:
Note: The custom code examples from our forum are shared to get you started in the right direction. You're welcome to adjust them as needed and for more personalized customization assistance, you can consider hiring a professional from our list of recommended contractors: https://toolset.com/contractors/