Support

Home Forums Event Espresso Premium How to get a venue map on the registration page?

How to get a venue map on the registration page?

Posted: January 10, 2013 at 9:50 am


spark

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:

do_shortcode("[ESPRESSO_VENUE show_map_image='true' map_image_wrapper='google-map' map_w='650' map_h='300']");

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


Dean

January 11, 2013 at 12:27 am

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

You could try creating a single event page by using the [SINGLEEVENT]
shortcode on the page, and use the slug or the page ID for that page.
A single event page that gets dynamically generated from the
[ESPRESSO_EVENTS] shortcode will share the same slug and page ID will
all the other events.

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.


spark

January 11, 2013 at 8:46 am

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


spark

January 11, 2013 at 8:48 am

Previous post omitted the code I entered and I couldn’t edit it, so here it is:

echo do_shortcode("[ESPRESSO_VENUE outside_wrapper_class='event-venue-map' show_map_image='true' map_image_wrapper='google-map' map_w='650' map_h='300' show_title='false' show_description='false' show_address='false' show_additional_details='false' show_image='false' show_google_map_link='true' map_link_text='View larger map']");

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.

Event Espresso