Geocoding with Google’s Maps API

In Job Listings > Settings, you’ll find a field to enter your Google Maps API Key.

When you enter your Google Maps API Key there, WP Job Manager will retrieve location information from Google Maps based on what’s entered into the location field when a job is submitted.

This is used to provide structured data for better integration with Google Job Search, and some third party themes/plugins use it to show listings on a map etc.

↑ Back to Top Getting an API key

You can get a Google Maps API by following Google’s instructions here.

Make sure your API key has the ‘Geocoding API’ enabled. Please follow this guide.

To use the API key, you must enable billing on your Google project. Google’s Geocoding API uses a pay-as-you-go pricing model. You get $200 USD free credit each month*, and you can set caps on your API usage to avoid being billed unexpectedly.

↑ Back to Top How to verify if Geocoding is working?

Create a new job listing with a location name, view the job listing in wp-admin. It should contain the location details in custom fields. For example:

↑ Back to Top When are API calls made?

Calls to the Google API are made when:

Geolocation data for a particular location is cached for 1 week, so an API call is not necessarily made every time in the above instances.

↑ Back to Top Geolocation Info and Custom Fields settings

Please note that to view what is saved as geolocation data in WP Jb Manager from the backend of your site, you need to enable the Custom Fields option in the WordPress Admin for the job post type.

You can do it by doing the following:

Here’s a screencast to guide you through it (the short video will be downloaded upon clicking on the link below):

Geolocation Info and Custom Fields settings

↑ Back to Top Is this optional?

The API key is required if you want your job listings to contain geolocation data. Without the key, the location entered in the Location field when submitting a job will be stored as a single text string in the _job_location custom field.

*accurate as of June 2019. Check Google’s terms and conditions for up-to-date billing information.