This page refers to displaying a map or specified venues. If you wish to display a map of events (matching specified criteria) see displaying a map of events.
To display your venue(s) on a Google map you can either use the the [eo_venue_map]
shortcode or the eo_get_venue_map()
function. With either you can:
- Display a specified venue or venues
- Display a map of the venue of the current event
- Display all venues
Using a shortcode:
Full details on using the venue map shortcode can be found on the Shortcodes > Venue Map page.
Displaying a specified venue
On any page or post you can display venue(s) on a map by adding the shortcode and specifying the venues’ slugs via the venues attribute as a comma-delimited list:
[eo_venue_map venue="my-venue-slug"]
[eo_venue_map venue="my-venue-slug,my-other-venue-slug"]
Displaying the current event’s venue
On any event page add the shortcode without specifying a venue:
[eo_venue_map]
Displaying all venues
On any page or post add the shortcode specifying the venue as %all%
:
[eo_venue_map venue="%all%"]
Using the function
If you wish to display a calendar from inside a WordPress template you can use the following:
<?php echo eo_get_venue_map( array( 'my-venue-slug', 'my-other-venue-slug') ); ?>
You can optional specify an options array as a second argument. See the codex on eo_get_venue_map
for details on the arguments it accepts.
Displaying the current event’s venue
Inside “the Loop”:
<?php echo eo_get_venue_map( array( 'my-venue-slug', 'my-other-venue-slug' ) ); ?>
or by by specifying the event’s (post) ID:
<?php echo eo_get_venue_map( eo_get_venue( $event_id ) ); ?>
inside the loop you do not need to specify the $event_id
:
<?php echo eo_get_venue_map( eo_get_venue() ); ?>
Displaying all venues
<?php echo eo_get_venue_map( '%all% ' ); ?>
Using custom markers with maps
The venue markers extension allows you to assign venues custom markers. You can upload your own custom markers or choose from over 150 bundled markers. See this page for more details.