API Key for Google maps - by Rob - on WordPress WooCommerce support

This topic has 8 replies, 2 voices, and was last updated 6 years, 8 months ago ago by Rose Tyler

  • Avatar: Rob
    Rob
    Participant
    July 31, 2017 at 13:43

    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?

    7 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    July 31, 2017 at 14:03

    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

    Avatar: Rob
    Rob
    Participant
    August 1, 2017 at 08:08

    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

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    August 1, 2017 at 10:13

    Hello,

    Please provide wp-admin and FTP access in Private Content.

    Regards

    Avatar: Rob
    Rob
    Participant
    August 3, 2017 at 08:06

    in the private box are the login data for FTP en admin

    thank you!

    Please, contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    August 3, 2017 at 12:35

    Hello,

    Fixed. Please check.

    Regards

    Avatar: Rob
    Rob
    Participant
    August 4, 2017 at 07:27

    Thank you!!!

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    August 4, 2017 at 07:34

    You’re welcome!

    Regards

  • Viewing 8 results - 1 through 8 (of 8 total)

The issue related to '‘API Key for Google maps’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.