Google Maps Not Working in WordPress - Newsqusto - A Readers Choice

An Insightful blog covering the latest trends, news, and analysis. Explore timely articles on technology, business, lifestyle, and more.

Information News Article

Wednesday, 21 November 2018

Google Maps Not Working in WordPress

Displaying a Google Maps element on your WordPress website is very common these days. You’ll rarely see a company or a product website without a proper location/map area. But whenever you find a theme or a plugin that uses Google Maps, there’s an extra step involved to make the map work. For new domains, the map often shows as a gray area and does not work at all. You are probably getting the “Oops! Something went wrong.” Google Maps Not Working error. Let’s explore the possible methods to solve the error –
See the source image

Fix the Google Maps Not Working Error

The Google Maps Not Working error in WordPress appears because you need to add an API key to make the maps work properly. This is a requirement since June 2016, and it is related with how Google handles traffic for the Google Maps service. Follow the steps bellow to properly display the maps on your website:

1. Getting an API Key

Head out to Googles Maps JavaScript API website. You should see a few clear steps on how to get the API key. Almost all Google services require authentication. This is ultimately a good thing, because you can closely monitor requests and API usage from the Google console. For the Google Maps specifically, you can choose between 2 packages:
  • Standard API users. This is good for most people, as you get 25,000 map loads in 24 hours. If you exceed this limit, you can setup a pay-as-you-go billing to adjust things depending on your website traffic.
  • Premium Plan users. This package is paid one, but you get significantly higher map load limit as well as some other advantages like 24-hour technical support. This plan is intended for websites that receive large amounts of traffic, and 90% of the time, it doesn’t apply to WordPress websites and blogs.

2. Registering the Key with your URL

Now that you know the difference, you can start with the free Standard API package by clicking on the blue “Get a Key” button. Note that you must have a Google Account and be signed in when you do this. Once you click the button, a window will pop-up on the screen asking you for a project name and TOS agreement. The name can be anything you like, but it is conventional to write your website’s name.
Make sure you register the Google Maps API with your URL, or else you would still have the Google Maps Not Working error. We must associate the URL with our new Google Maps API.
After a few seconds, you’ll get a “You’re all set!” window with your API key. You need to copy this key, because now we’re going to use it in WordPress. To improve your website’s or app’s security, you can restrict the key’s usage from Google’s API console.

Using Your API Key in WordPress

Wrapping Up

Sometimes, the Google Maps still works on older domain names. If we wish to display the Google Maps on a new domain, we must register an API key or else we may get the “Oops! Something went wrong.” Google Maps Not Working error. displayed when you were checking it out, is because the developers were using their own API key for previewing the theme’s features. This also applies to plugins. To display the map with your location, you must use the API key generated in the section above. How can we do that? Well, it all depends on the package. The developers either reserved a field in the theme/plugin settings for the API key, or you need to find the API request into the code, and insert it yourself.
To find out which option applies in your case, go through the options page, and look for Google Maps API key section. You can also ask around on forums and support pages. If there is a field, you just paste in your key and you’re all set! Now, when you reload the website, your location should be displayed.

No comments:

Post a Comment