Back to Blog

How to Add Google Maps Directions to WordPress (Get Directions Button)

Let visitors get directions to your business from their current location, drawn on a Google map on your own page — with GeoVerse Maps' free Get Directions feature — plus the no-plugin link method and setup tips.

To add Google Maps directions to WordPress, install the free GeoVerse Maps plugin, add a Google Maps API key with the Directions API enabled, insert the Google Maps block with your location as a marker, and turn on directions. Visitors tap Get Directions and the route from where they are is drawn on the map, by car, on foot, by bike or by transit — on your page.

Option 1: directions on your page with GeoVerse Maps (free)

What you need

  • GeoVerse Maps — free, with no paid version.
  • A Google Maps API key with the Maps JavaScript API and Directions API enabled. Add the Places API too if you want a search box. Our API key guide walks through it, including restricting the key to your domain.
  • Your site on HTTPS (browsers only share location on secure pages).

Set it up

  1. Install GeoVerse Maps and paste your key in Settings → GeoVerse Maps (or the block's API Key panel).
  2. Edit your contact or location page and insert the Google Maps block.
  3. Add a marker for your location by searching for the address. Give it an info window with your opening hours and phone number.
  4. In the block settings, turn on directions and choose the travel mode: driving, walking, bicycling or transit.
  5. Publish, then open the page on your phone and tap Get Directions.

The browser asks the visitor for their location; the route from there to your marker is drawn on the map.

Several locations

With more than one marker — branches, stores, venues — each marker gets its own directions. Add categories with front-end filtering, a search box and a marker list below or beside the map, and you have a simple store locator. See how to build a free store locator.

Choosing the travel mode

BusinessTravel mode
Out-of-town store, warehouse, venue with parkingDriving
City-centre café, shop or officeWalking or transit
Bike shop, cycling caféBicycling
Hotel or attraction visited by touristsTransit

Mention the alternatives in your text — "5 minutes' walk from Central Station; parking on Mill Street" — so visitors with other plans aren't left guessing.

Option 2: a directions link, no plugin

If you don't want an API key, a link does the job. Make a Button block that links to:

https://www.google.com/maps/dir/?api=1&destination=Your+Business+Name,+123+Main+St,+City

Replace the destination with your business name and address (use + for spaces). On phones it opens the Google Maps app with your business as the destination; on desktop it opens Google Maps in the browser.

Trade-off: visitors leave your page, and you can't style it — but there's nothing to set up and no API usage.

A good combination: GeoVerse's on-page directions, plus a link button under the map as a fallback for visitors who decline location access.

Make it work for everyone

  • Say why you're asking. "Allow location to see the route from where you are" next to the button reduces declined prompts.
  • Show the address as text under the map — for screen readers, search engines, and anyone copying it into their own app.
  • Add a fallback link for visitors who decline location access.
  • Check the pin. Make sure the marker sits on your entrance, not the centre of a large building or car park.
  • Keep your Google Business Profile in sync with the address on the page. See maps and local SEO.

Costs

Directions requests go to Google's Directions API under your key. Google applies its own pricing and free usage allowance, so set a budget alert in Google Cloud and restrict the key to your site. For a page that only needs a map and a link, GeoVerse's keyless embed plus a directions link uses no API at all — see Google Maps without an API key.

Common Questions

Install GeoVerse Maps, add a Google Maps API key with the Directions API enabled, insert the Google Maps block, add your location as a marker and turn on directions in the block settings. Choose the travel mode and publish.

GeoVerse Maps lets you choose driving, walking, bicycling or transit as the travel mode for the route.

Directions start from the visitor's current location, so the browser asks for permission. If they decline, or the site isn't on HTTPS, there's no starting point. A plain Google Maps directions link is a good fallback.

Yes. Link a button to a Google Maps directions URL with your address as the destination. It opens Google Maps in a new tab or the app instead of drawing the route on your page.

Get new guides and releases by email

Occasional emails when we publish a guide or ship a notable plugin update. No spam — unsubscribe any time.

We only use your email to send these updates. See our privacy policy.