Posted: January 10, 2013 at 9:50 am
|
What I want is to display a map that shows the venue location on an event registration page. My original post: https://eventespresso.com/topic/loading-a-script-on-a-specific-page/ I cannot get any EventEspresso-provided shortcode to display a map on the registration page. Right now I’m using my own implementation of the Google Maps API and the gMap jQuery plugin in order to display the map. Unfortunately this loads on every page on the website rather than just an event registration page, since there doesn’t seem to be a clear way to identify when a user is viewing an event registration page. Dean Robinson suggested using the Venue Shortcode, but it doesn’t work… unless I’m just doing it wrong? I added this to my registration_page_display.php file but it doesn’t display anything:
Josh suggested I create a single event page by using the [SINGLEEVENT] shortcode on the page. I don’t understand how this would work. How would I get EventEspresso to know to use that page for a given event instead of using registration_page_display.php, or rather, how would the calendar or event list know to link to that page I created? And even if that did work, if the map won’t work on the default registration_page_display.php, why would it work if I made my own? My problem can be solved by either A) Getting the Google Maps API and gMap plugin to load only on the event registration page, or B) Getting the [ESPRESSO_VENUE] shortcode to work on registration_page_display.php |
|
Hi, Just to clarify the code in its entirety would be I can only think you may have missed the echo? I think what Josh was saying here
is that if you use the Google maps and is_page() you can use the slug or id for that page in the is_page() attributes (eg page called wibble, is_page(‘wibble’) ) Using [SINGLEEVENT] would create a separate instance of and the calendar etc would still point to the standard event. I would re-examine the venue shortcode, it does work. |
|
Well, the echo is indeed what I was missing, now I feel dumb 😛 Now I’m using the following code, but the link to the map doesn’t appear. The map link only appears when show_address=’true’. May I suggest changing the map link independent in a future version? For now I have made a modified version of the espresso_venue_details_sc function in shortcodes.php |
|
Previous post omitted the code I entered and I couldn’t edit it, so here it is:
|
The support post ‘How to get a venue map on the registration page?’ 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.