WD Events Maps

WD Events Maps is a lightweight location add-on for WD Events Lite.

It adds optional Google Maps support to event pages using latitude and longitude coordinates, with address fallback support where required.

The plugin is designed for simple event location display without the overhead of larger mapping or directory systems.

Functional overview

  • Google Maps integration for individual events
  • Latitude and longitude support for accurate map placement
  • Address fallback support
  • Optional map display per event
  • Map label support
  • Custom zoom support
  • Default map height setting
  • Get directions button
  • Shortcode-based output
  • Divi-friendly template support
  • Loads Google Maps only where the shortcode is used
Note: WD Events Maps is an optional add-on. It is designed to extend WD Events Lite without adding mapping overhead to the core plugin.

Installation

  1. Install and activate WD Events Lite.
  2. Install and activate WD Events Maps.
  3. Ensure Advanced Custom Fields is active.
  4. Add a Google Maps API key in the plugin settings.
  5. Add the map shortcode to the single event template.
Requirement: A Google Maps JavaScript API key is required for map display.

Plugin settings

Go to:

WordPress Admin → Settings → WD Events Maps

Configure:

  • Google Maps API Key
  • Default Zoom
  • Default Map Height

Default zoom

15

Default map height

420px

Example height values:

360px
420px
500px
60vh

Automatic ACF fields

WD Events Maps automatically creates the required event map fields.

No manual ACF JSON import is required.

Event map fields

  • Show Map
  • Latitude
  • Longitude
  • Map Label
  • Map Zoom

Existing event fields used as fallback

  • Event Location Name
  • Event Address
Tip: Latitude and longitude are recommended for best accuracy. Address fallback is useful for quick setup but may be less precise.

Event setup

Go to:

WordPress Admin → Events → Edit Event

Configure the event map fields:

  • Show Map — enable map display for this event
  • Latitude — e.g. 51.5074
  • Longitude — e.g. -0.1278
  • Map Label — optional marker label
  • Map Zoom — optional per-event zoom override

Example event map setup

Show Map:
Enabled

Latitude:
51.5074

Longitude:
-0.1278

Map Label:
Workshop Venue

Map Zoom:
15

Shortcode

Add this shortcode to the single event template where the map should appear:

[wd_event_map]

Optional shortcode parameters

Set zoom:

[wd_event_map zoom="15"]

Set height:

[wd_event_map height="420px"]

Hide directions button:

[wd_event_map directions="false"]

Full shortcode example

[wd_event_map zoom="15" height="420px" directions="true"]

Divi template setup

Recommended Divi Theme Builder structure:

Section
├── Heading module
└── Code module containing shortcode

Heading example:

Location

Code module:

[wd_event_map]

Use Divi conditional logic to show the section only when a map is enabled.

Recommended condition

event_show_map greater than 0
Tip: Apply conditional logic to the whole section, not only the shortcode module. This prevents empty spacing when no map is available.

Directions link

WD Events Maps can output a Get directions button below the map.

If latitude and longitude are available, the directions link uses coordinates.

If only an address is available, the directions link uses the event address.

Disable directions

[wd_event_map directions="false"]

Location fallback behaviour

WD Events Maps uses the following order:

  1. If latitude and longitude exist, use those for the marker.
  2. If coordinates are missing but an address exists, use the address as a fallback.
  3. If neither exists, no map is displayed.
Recommendation: Use latitude and longitude whenever possible. This avoids postcode or address lookup inaccuracies.

Google Maps API setup

In Google Cloud Console, enable:

Maps JavaScript API

Recommended API key restrictions:

  • Use HTTP referrer restrictions
  • Restrict to the client website domain
  • Avoid using unrestricted API keys

Example referrer:

https://yourdomain.co.uk/*

Performance notes

WD Events Maps follows the same lightweight approach as WD Events Lite.

  • Google Maps only loads when [wd_event_map] is used
  • No map scripts are loaded globally across the site
  • No directory or clustering overhead
  • No unnecessary frontend assets on unrelated pages
  • Best suited to single event location display
Performance note: If the map shortcode is not present, Google Maps is not loaded.

FAQ

Does WD Events Maps require Divi?

No. It works with Divi, Elementor, Bricks, Beaver Builder, Gutenberg and most WordPress themes.

Does it use Google Maps?

Yes. It uses the Google Maps JavaScript API.

Can I use only an address?

Yes, but latitude and longitude are recommended for better accuracy.

Can I hide the map if no location is available?

Yes. Use Divi conditional logic with the event_show_map field.

Does it support multiple event maps on one page?

The plugin is primarily designed for single event detail pages. Wider event directory maps could be added later as a separate feature if required.

Can I disable the directions button?

Yes. Use:

[wd_event_map directions="false"]

Does Google Maps load on every page?

No. Google Maps only loads where the event map shortcode is rendered.

Recommended setup

For most event detail pages:

[wd_event_map]

For a taller map:

[wd_event_map height="500px"]

For a tighter local venue map:

[wd_event_map zoom="16" height="420px"]