• Good day

    My google maps is not working and am unsure how to proceed. It keeps telling me to look at java script for more details but I don’t know code.

Viewing 3 replies - 1 through 3 (of 3 total)
  • We need you to provide more details about the error, if you use Chrome please open the website where you have the problem then click F12 then ESC and you will see some errors in red, copy/paste here 🙂

    Thread Starter ctinternational

    (@ctinternational)

    The script element that loads the API is missing the required authentication parameter. If you are using the standard Maps JavaScript API, you must use a key parameter with a valid API key. If you are a Premium Plan customer, you must use either a client parameter with your client ID or a key parameter with a valid API key.

    That’s pretty clear :P, just add theses lines in your functions.php after changing YOUR_API_KEY with the key you get it from here : https://developers.google.com/maps/documentation/javascript/get-api-key (click get key button)

    add_action('wp_footer', 'google_api_js');
    function google_api_js(){
    	wp_enqueue_script( 'google-map-api', 'https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap');
    }
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Google Maps not working’ is closed to new replies.