Answer the question
In order to leave comments, you need to log in
How to specify geolocation on posts through ACF if Google does not allow you to use the map api for free?
Hello, I planned to mark places through the Yandex map, so that when you click on the balloon, you can go to the page of this place on the site, here is an example of a map.
But for this you need to set coordinates for posts through acf, at first it seemed to me a good idea, but for some reason acf I didn’t work with the map and gave an error
. Then I read that you need to specify the Google Maps api key in function.php, I got it and went to configure it, here is the code:
function my_acf_google_map_api( $api ){
$api['key'] = 'ключ; // Ваш ключ Google API
return $api;
}
add_filter('acf/fields/google_map/api', 'my_acf_google_map_api');
Answer the question
In order to leave comments, you need to log in
The issue was resolved, they don’t write off money right away, there is a limit on usage per month for which you don’t pay, well, as I understand it, I hope they don’t write off 300 bucks now
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question