How to Generate and Configure Google Maps API Keys for WP Job Manager

To use Google Maps with WP Job Manager, you need to generate two separate API keys: a Server-side API key and a Client-side API key. These keys ensure smooth geolocation services and map functionality within your job listings when using the Jobify theme. This guide will walk you through obtaining, setting up, and restricting both API keys to enhance security and performance.

Step 1: Access the Google Developer Console

  1. Go to the Google Developer Console.
  2. Create a new project or select an existing one from the project list at the top of the screen.
  3. Enable the necessary APIs:
    • Maps Javascript API
    • Geocoding API
    • Geolocation API
    • Places API

Step 2: Generate API Keys

1. Creating the Server-Side API Key

  • This key is used for server requests and must be restricted by IP address.
  • In the Google Developer Console:
    1. Navigate to Credentials > Create Credentials > API Key.
    2. Copy the generated key.
    3. Click Edit API Key and set restrictions:
      • Application restrictions: Select IP addresses and add your server’s IP.
      • API restrictions: Restrict it to the enabled APIs (Maps JavaScript API, Geocoding API, etc.).
    4. Click Save.
  • Add the Server API Key to WP Job Manager:
    • Navigate to Job Listings > Settings > Google Maps API Key.
    • Paste your Server API key here.

2. Creating the Client-Side API Key

  • This key is used for browser requests and must be restricted by website URL.
  • In the Google Developer Console:
    1. Go to Credentials > Create Credentials > API Key.
    2. Copy the generated key.
    3. Click Edit API Key and set restrictions:
      • Application restrictions: Select HTTP referrers (Websites) and enter your website URL (e.g., https://yourdomain.com/*).
      • API restrictions: Restrict it to the enabled APIs (Maps JavaScript API, Geocoding API, etc.).
    4. Click Save.
  • Add the Client API Key to WP Job Manager:
    • Navigate to Appearance > Customizer > Jobs > Map Settings > Google Maps API Key.
    • Paste your Client API key here.

Step 3: Set Up Billing

Google requires a billing account to use the Maps API. To set up billing:

  1. Navigate to the API console.
  2. Select your project.
  3. In the billing section, create a new billing account.
  4. Fill in the required details and submit to enable billing.

Note: Any usage beyond Google’s free tier will be billed according to their pricing structure.


Step 4: Verify API Key Functionality

  • Use the Test API Key button in WP Job Manager settings to confirm your Server API key is working.
  • Ensure maps are loading correctly on your site using the Client API key.
  • If issues persist, verify API restrictions, billing setup, and enabled services.

API Restriction Settings

Refer to the following link for detailed API restriction settings:

By correctly setting up both the Server-Side and Client-Side Google Maps API keys, you ensure that WP Job Manager can properly handle job listing geolocation and map functionalities. Applying API restrictions enhances security and prevents unauthorized usage. If you encounter any issues, refer to Google’s API documentation or check your API settings in WP Job Manager.

For any additional queries, feel free to reach out!

Was this article helpful?

Related Articles