Don't miss to check our Sales page to get informed of any offers and discounts.

Okay
  Print

Add your own API key for the Google Maps

In some case it is needed a different API key for the Google maps. 

So please:

1. Generate an API key from here https://developers.google.com/maps/documentation/javascript/get-api-key 

2. Place your API key in the related field in Theme Options > Map Options.



Alternative solution with the child theme

1. Generate an API key from here https://developers.google.com/maps/documentation/javascript/get-api-key 

2. Use the child theme to add one of the following functions according to the theme you are using:

//Blade Theme
function grve_child_map_scripts() {
 wp_register_script( 'blade-grve-googleapi-script', '//maps.googleapis.com/maps/api/js?key=API-KEY', NULL, NULL, true );
}
add_action( 'wp_enqueue_scripts', 'grve_child_map_scripts' );
//Osmosis - Reload
function grve_child_map_scripts() {
 wp_register_script( 'grve-googleapi-script', '//maps.googleapis.com/maps/api/js?key=API-KEY', NULL, NULL, true );
}
add_action( 'wp_enqueue_scripts', 'grve_child_map_scripts' );

3. Place your API key in the API-KEY space you see in the function.