Google Maps not working?

Is the Google Maps widget not working on your site anymore? Is something like this popping up:

Google recently changed the way that Google Maps works. Since June 22 2016 they do not allow map requests without an API key, so that's why the maps stopped working.

How to fix this?

1. You should get a Google Maps API key from this URL.

2. Update your theme to the latest version:
   - Setup automatic updates with Envato Market plugin or
   - Manually update the theme.

3.a. Go to Appearance -> Customizer -> Theme Options -> Other and input your Google Maps API key, that you generated in the first step.

3.b. In older themes, this Google Maps API key option is located in: Appearance -> Customizer -> Contact Page.

3.c. Newer themes: StructurePress, Beauty, Auto, Bolts, Shaka,... do not use our custom Google Maps widget, but instead they use the SiteOrigin Google Maps widget in which you should add the Google Maps API key as well.

 

If the theme you are using is not yet updated, please edit the functions.php file in the theme folder and find this url:

'//maps.google.com/maps/api/js'
And change it to:
'//maps.google.com/maps/api/js?key=YOUR_API_KEY_GOES_HERE'

 

More info on why Google decided to do this can be found here.


Have more questions? Submit a request

Can't find what you're looking for?

Submit a ticket to our help team or Start a new community discussion.

Comments

  • Avatar
    Reach Maine Marketing

    Thanks Gregor. That was helpful.

    Since we are not using the google maps on our website, I added the following to my child theme's functions.php to deregister the googlemaps javascript and get rid of the console error.

    I thought it might be help for others.


    add_action('wp_enqueue_scripts', 'reach_scripts', 100);
    function reach_scripts() {
    wp_deregister_script( 'buildpress-gmaps' ); // not using google maps
    }

  • Avatar
    Gregor Capuder

    Hi,

    thanks for sharing this with others! :)

    Take care!

Can't find what you're looking for?

Submit a ticket to our help team or Start a new community discussion.
Powered by Zendesk