ACF: How to set Google Maps API key

I am using Advanced Custom Fields for WordPress, and within that, I am trying to use the Google Maps field type.

After installation, there is no API key set for the usage of the Google Maps API, so you need to set it yourself. If you do not, you will get an error in the developer console of your browser:


Here are the steps involved to save your API key for your Advanced Custom Fields Google Maps field type:

  1. Get an API key from Google
  2. Open your theme’s function.php and put the following code
  3. Save the file,

It’s as simple as that. Enjoy.

Fixed: TypeError: Cannot read property ‚replace‘ of undefined

So I tried to run my iOS Cordova hybrid app on the emulator with the following command

What came back to me was a nasty error, which would not let me build the app on the emulator:

I have found this solution on stackoverflow, which fixed it for me