This topic has 8 replies, 2 voices, and was last updated 7 years, 4 months ago ago by Rose Tyler
After an update from http to https the map on the contactpage isn’t working anymore.
Could you please let me know how to add our API key?
Hello,
Please read how to get API key https://developers.google.com/maps/documentation/javascript/tutorials/adding-a-google-map#step_3_get_an_api_key .
Then you need edit the file wp-content/themes/blanco/code/shortcodes.php, find the line wp_enqueue_script('google.maps', 'http://maps.google.com/maps/api/js?sensor=false');
, replace the code with this http://maps.google.com/maps/api/js?key=YOUR_API_KEY&sensor=false');
, add your API key instead of “YOUR_API_KEY” text in the link.
Regards
Good moring Rose,
Unfortunately it doesn’t work…..
The old code was:
} else {
if($a[‘gmap’] == 1):
wp_enqueue_script(‘google.maps’, ‘http://maps.google.com/maps/api/js?sensor=false’);
wp_enqueue_script(‘gmap’, get_template_directory_uri().’/js/jquery.gmap.min.js’);
?>
I changed it in:
} else {
if($a[‘gmap’] == 1):
http://maps.google.com/maps/api/js?key=AIzaSyBMbWDq7-r-BuLteiZGFEIFDUEb3cMcrJU&sensor=false’);
wp_enqueue_script(‘gmap’, get_template_directory_uri().’/js/jquery.gmap.min.js’);
?>
What am I doing wrong please?
Kind regards,
Rob
Hello,
Please provide wp-admin and FTP access in Private Content.
Regards
in the private box are the login data for FTP en admin
thank you!
Hello,
Fixed. Please check.
Regards
Thank you!!!
You’re welcome!
Regards
Tagged: api key, google maps, json array, templates, woocommerce, wordpress
The issue related to '‘API Key for Google maps’' has been successfully resolved, and the topic is now closed for further responses