D’oh! No, we were a few minor versions behind. Updating solved it. Thanks!
(In the future I must remember to update plugins and check again before posting …)
Thanks for this! I was kind of hoping things would have changed/improved since the previous thread.
I ended up adapting your example in that old thread, where you searched and replaced the admin page output. I wanted a button to reside in the middle of a field group, so I added a “Message” field in the group, where the message text is something like FLUSH_API_CACHE, which I then replace with HTML for the button/link, which just checks for a URL parameter and deletes the transient if present.
But I’ll make sure to remember this thread for later use.
Never mind, I found it out myself: You need ACF Pro for that to work. For the free version, there’s another way. More details here.
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?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.