Support

Account

Home Forums Backend Issues (wp-admin) Google Maps field needs setting to add API key Reply To: Google Maps field needs setting to add API key

  • Google Maps worked fine in the backend on my local dev setup, but when I pushed it to staging, the API reports “Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys” in DevTools console.

    I have tried many of the solutions above, but ended up with this in functions.php of my theme, which seems to be the recommended way:

    // Setting the Google Maps API key for ACF
    function bmhe_acf_init() {
    acf_update_setting(‘google_api_key’, ‘MY_API_KEY’);
    }
    add_action( ‘acf/init’, ‘bmhe_acf_init’ );

    Can somebody tell me why Google isn’t getting this API?