A Get Directions button turns a listing from something a visitor reads into somewhere they can go. On a WordPress directory built with Listora, you do not add it by hand: every listing that has map coordinates shows a Directions button at the top of the page and a Get directions link under the map, and both open a route to that place in Google Maps. This post explains what the button does, what a listing needs before it appears, how to make sure yours do, and what to check when one is missing.
We make Listora, a directory plugin for WordPress, so we have a stake in this. We will say plainly what the button does not do.
Why does a directory need a directions button?
People rarely browse a directory for fun. They have a job in mind. They want a plumber who can come this week, a cafe near the station, a vet that is open on Saturday. The moment they decide on one, the next question is how to get there.
If the listing has an address in plain text and nothing else, the visitor copies it, opens a maps app, pastes it and starts again. Some do. Many do not, and the tab closes. A button that hands the destination straight to a map shortens that gap to one tap.
For a local directory that is more than a nicety. The listing’s purpose is to send someone to a real door, and a directions link is the last step of that journey on your site. It is also a signal for you: when a visitor taps it, they are about to go there.
What does the button do in Listora?
On every single listing page, Listora shows the directions link in two places.
The header actions. Next to Save, Share and Claim, a Directions button sits in the row of actions at the top of the listing. It is a secondary button with a small navigation arrow.
The map card. In the sidebar, under the map, you will find the listing’s address line, its plus code and a Get directions button.
Both buttons use the same link. A single helper builds it from the listing’s coordinates, so the two can never point to different places. The link opens Google Maps in a new tab with that listing set as the destination, so the visitor picks where to start from and how to travel. On a phone, opening a Google Maps link normally offers the Maps app. Check that on the devices your audience uses.
There is nothing to switch on. The button is part of the Free plugin, with no add-on and no shortcode.
What does a listing need for the button to appear?
Coordinates. A listing shows Directions only when it has a latitude and a longitude. Without them there is nothing to send to a map, so the button is left out rather than shown broken.
This matters because a listing can have an address and still have no coordinates. A name and street typed into a text field is not the same as a pin on a map. If you see the address but no Directions button, the pin is what is missing.
One detail worth knowing: Listora treats zero as a real value in other places, but for the directions link it returns nothing when both numbers are zero. A listing with no coordinates saved never gets a link to the middle of the ocean.
How do listings get coordinates?
There are four ways, and a mix is normal.
The submission form. When a member adds a listing through the front-end form, the address field has a map with a draggable pin, so the submitter can set the exact spot. A pin dragged to the entrance of a building is more useful than one placed on the street. If members add their own listings, tell them to place the pin properly. Our guide to setting up your first listing submission form shows the form.
The admin screen. If you add listings yourself, set the address and location in the listing editor, then open the listing on the front end and look for the button.
Imports. The JSON importer accepts listings with latitude and longitude, and the GeoJSON importer turns each feature’s geometry into coordinates. The CSV export includes latitude and longitude too, which makes a round trip from a spreadsheet straightforward. The import and export docs cover each format.
Geocoding with Google. If you use Google Maps through Listora Pro, typed addresses can be converted to coordinates, and address autocomplete helps submitters enter accurate ones. See the Google Maps docs. If a map has listings without markers, the docs say to re-save those listings to trigger geocoding again.
Which maps you use is a separate choice. Free uses the map tiles you choose in the settings, and Listora Pro adds Google Maps. The post on Google Maps or OpenStreetMap helps you pick, and the map settings page shows where to set it. The Directions button works either way, because it only needs the coordinates.
How do you check that every listing has one?
Do a quick pass before you promote the directory, and again whenever you import a batch.
- Open a handful of listings that came from different places: one submitted through the form, one you added in the admin, one imported.
- Look at the top of each page for the Directions button.
- Click it. Confirm Google Maps opens and the destination is the right door, not the next street.
- Open the map card in the sidebar and check the Get directions link there too.
- Try a listing you know has no pin. You should see the address and no Directions button.
If a whole batch is missing buttons, the import probably carried addresses but no coordinates. Fix the source file, or geocode the addresses, and import again. When you move over from another directory plugin with Listora’s migrator, it matches existing listings by title and coordinates, so running it again does not duplicate them.
What about visitors who use another maps app?
The default link goes to Google Maps. That suits most people, and it is easy to explain. Some audiences prefer another app, and Listora lets you change where the link goes.
The helper that builds the link is only defined if nothing else has defined it first. A small must-use plugin that defines a function with the same name, loaded before Listora, replaces the link for both buttons at once. This example sends visitors to Apple Maps:
<?php
/**
* Plugin Name: Directions in Apple Maps
*/
if ( ! function_exists( 'wb_listora_directions_url' ) ) {
function wb_listora_directions_url( $lat, $lng ) {
$lat = (float) $lat;
$lng = (float) $lng;
if ( ! $lat && ! $lng ) {
return '';
}
return 'https://maps.apple.com/?daddr=' . rawurlencode( $lat . ',' . $lng );
}
}
Put the file in your must-use plugins folder, because those load before regular plugins. Then test it on an iPhone and on an Android phone, because how a phone handles a maps link is up to the phone. If you are not comfortable adding code, leave the default alone. It works.
Can you see who tapped it?
With Listora Pro, yes. The click-event tracking in Pro records clicks on phone, website, email and directions links, and the analytics dashboard adds them together as contact clicks. The free plugin tracks views of each listing, and Pro adds the clicks on top.
That gives you something concrete to tell a business owner: your listing was viewed this many times, and this many people tapped to call, visit your site or get directions. For a directory that sells paid or featured listings, those figures are what an owner wants to see. Our post on how directory websites make money covers that side.
How do you write an address that lands on the right door?
The pin decides where the button sends people, but the address is what a human reads, and the two should agree. A few habits keep them honest.
Use the full street address, with the number, the street, the town and the postcode. “Opposite the station” tells a person something and tells a map nothing. If the entrance is not on the street the address names, say so in the description, for example “enter from the car park on the east side”, and drag the pin to the door people actually use.
For a building with several businesses, put the unit or floor in the address line and keep the pin on the building. For a large site such as a market or a campus, place the pin at the main visitor entrance, not in the middle of the grounds. Test it on a phone, where a pin that looks fine on a desktop map can turn out to be on the far side of a fence.
What about businesses with more than one branch?
Give each branch its own listing, with its own address and its own pin. A single listing for a chain with five shops cannot have five Directions buttons, and one pin would send four out of five visitors to the wrong place. Separate listings also let each branch carry its own opening hours, phone number and photos, which is what a visitor deciding where to go actually needs.
If the branches share a brand, a common category and the same business name in the title keep them easy to find as a group, and the location hierarchy lets visitors browse by town.
What if a business has no shopfront?
Plenty of listings are for people who come to you: plumbers, mobile groomers, tutors, caterers. A Directions button that sends a customer to the owner’s home is the wrong thing to show, and many owners would not want it.
For these listings, leave the pin off, or place it at a public office or the centre of the area they cover, and use the service area in the description. Without coordinates there is no Directions button, which is the right outcome. Say clearly on the listing that the business travels to customers, so visitors do not expect to find a door.
Can you check it on a phone before you launch?
Yes, and you should, because directions are most often used on a phone, standing outside. Open three listings on your own phone and tap Directions on each. Watch what happens: does your phone offer to open a maps app, does the destination match the listing, does the back button bring you straight back to your site?
Then ask someone with a different phone to do the same. A small test with two people finds most of the problems that matter. Fix a bad pin by dragging it to the right place and saving the listing, then tap the button again to confirm.
What does the button not do?
It is worth being plain about the limits.
It does not give turn-by-turn directions itself. It opens a maps app or site that does. Your site never stores where a visitor starts from.
It does not work without coordinates. If you want the button on every listing, every listing needs a pin.
It does not invent coordinates. They come from the pin on the form, an import that carries them or Google geocoding in Pro. Submit a test listing and see what your own form does before you rely on it.
It is not a replacement for a good address. The address line, the plus code and the map card all stay on the page, because some visitors want to read where a place is before they decide to go.
What else should a local listing show?
The directions link works best with a few other things nearby. A visitor who has decided to go will also want to know whether the place is open.
- Opening hours. The listing can show business hours, so the visitor knows if the door is open when they arrive. See the business hours docs.
- A phone number. Some people will call to check parking or availability before they set off.
- Photos of the entrance. A picture of the front of the building removes doubt at the last step.
- A clear location hierarchy. Country, state, city and neighbourhood pages help visitors browse by area and give each place its own archive. The locations docs explain it.
None of these needs a plugin beyond the one you already have. They are fields on the listing.
A short checklist before you launch
- Every listing you want a button on has a pin, not only an address.
- Imported listings carry latitude and longitude, or have been geocoded.
- You have clicked Directions on listings from each source and ended at the right door.
- Your submission form tells members to place the pin carefully.
- You have decided whether Google Maps is the right default for your visitors.
If you would like to see the button before you build anything, the live demo runs a working directory you can click around in. The directory plugin for WordPress page lists what the plugin includes, and setting up your first listings walks through adding the first few.
A directory earns its keep when a visitor leaves your site and arrives at a real place. The Get Directions button is the shortest bridge between the two, and it costs you nothing but a pin on each listing.