Title: Google Maps api key
Last modified: September 1, 2016

---

# Google Maps api key

 *  [constantine1](https://wordpress.org/support/users/constantine1/)
 * (@constantine1)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/google-maps-api-key-1/)
 * Google Maps doesn’t work without api key anymore (on new sites). Is there any
   way to add key parameter for the script in admin panel? It’s impossible to use
   Google Map field without it…
 * [https://wordpress.org/plugins/advanced-custom-fields/](https://wordpress.org/plugins/advanced-custom-fields/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Anonymous User 13855214
 * (@anonymized-13855214)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/google-maps-api-key-1/#post-7522133)
 * I am also facing the issue, whats worse is my page is not even loading properly
   due to errors generated by map.
 *  [bobbydank](https://wordpress.org/support/users/bobbydank/)
 * (@bobbydank)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/google-maps-api-key-1/#post-7522186)
 * This is the only solution I have found at the moment until the plugin author 
   comes up with a better solution. You have to create your key with Google APIs.
   You will then need to add the key to:
 * advanced-custom-fields/js/input.js
    advanced-custom-fields/js/input.min.js
 * input.js is a bit easier to find. On line 2282 you will see:
 *     ```
       if( typeof google === 'undefined' )
       {
       	$.getScript('https://www.google.com/jsapi', function(){
   
                       google.load('maps', '3', { other_params: 'sensor=false&libraries=places', callback: function(){
   
       			        $fields.each(function(){
   
       						acf.fields.google_map.set({ $el : $(this) }).init();
   
       					});
   
       			    }});
       			});
   
       		}
       		else
       		{
       			google.load('maps', '3', { other_params: 'sensor=false&libraries=places', callback: function(){
   
       				$fields.each(function(){
   
       					acf.fields.google_map.set({ $el : $(this) }).init();
   
       				});
   
       		    }});
   
       		}
       ```
   
 * At the end of places (inside the ‘), you need to add:
 * `&key=*YOUR_API_KEY*`
 * So it will look like:
 *     ```
       google.load('maps', '3', { other_params: 'sensor=false&libraries=places&key=*YOUR_API_KEY*', callback: function(){
       ```
   
 * It is harder to find in the min file for obvious reasons, so well tailored Find/
   Replace will work here.
 * I will say that the min file is what is read from the back end, so it is the 
   file you have to make this edit to.
 * Hope that helps.
 *  Anonymous User 13855214
 * (@anonymized-13855214)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/google-maps-api-key-1/#post-7522221)
 * Thanks bobbydank,
 * This can fix the problem for now. I am only worried if someone updated the plugin,
   this has to be done again. But we have no other option until ACF releases an 
   update and fix this issue.
 *  [dolf h](https://wordpress.org/support/users/dolf-h/)
 * (@dolf-h)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/google-maps-api-key-1/#post-7522336)
 * Hi Bobbydank,
 * Thank you for your suggestion, but it does not work for me.
    I have placed the
   right API-key in the right 4 places (with and without *) and still I get in front
   the warning: “Google Maps API warning: NoApiKeys” In back-end the error: “invalid
   Api-key” I get the same warning in front without adding Api-keys. In back-end
   the map is showing up without adding API-key. No caching at all. Newest WP and
   ACF. I renewed the correct API-key (and waited an hour), without result. Would
   be nice to get some suggestions.
 *  [dolf h](https://wordpress.org/support/users/dolf-h/)
 * (@dolf-h)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/google-maps-api-key-1/#post-7522338)
 * To be complete: I have a JS browser key en added my domain correctly.
 *  [ScratchCode Io](https://wordpress.org/support/users/msdnsditlabs/)
 * (@msdnsditlabs)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/google-maps-api-key-1/#post-9031325)
 * If you are using free ACF plugin add following code in your function.php file.
   Replace your google maps API key with “xxx”.
 *  if(is_admin()):
    function my_acf_google_map_api($api){ $api[‘key’] = ‘xxx’; 
   return $api; } add_filter(‘acf/fields/google_map/api’, ‘my_acf_google_map_api’);
   endif;
 * If you are using ACF pro plugin, then add following code in your function.php
   file
 *  if(is_admin()):
    function my_acf_init() { acf_update_setting(‘google_api_key’,‘
   xxx’); } add_action(‘acf/init’, ‘my_acf_init’); endif;
 * > Note: Most important things that you have to keep in mind for the best
    > solution
   of above issue. If you are using ACF pro plugin then you must > enter ACF pro
   plugin activation key. After inserting the key in plugin > check your backend
   your issue is solved.
 * For more information you can visit here : [http://www.krazzycodes.com/google-map-not-showing-in-wordpress-backend-acf-plugin/](http://www.krazzycodes.com/google-map-not-showing-in-wordpress-backend-acf-plugin/)

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Google Maps api key’ is closed to new replies.

 * ![](https://ps.w.org/advanced-custom-fields/assets/icon.svg?rev=3207824)
 * [Advanced Custom Fields (ACF®)](https://wordpress.org/plugins/advanced-custom-fields/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-custom-fields/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-custom-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-custom-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-custom-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-custom-fields/reviews/)

 * 6 replies
 * 5 participants
 * Last reply from: [ScratchCode Io](https://wordpress.org/support/users/msdnsditlabs/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/google-maps-api-key-1/#post-9031325)
 * Status: not resolved