Tagged: Google Maps API
Hi,
I am using a plugin which uses the Google Maps API. This conflicts with the already included Google Maps API in Enfold.
The JS Console gives this error
Warning: you have included the Google Maps API multiple times on this page. This may cause unexpected errors.
I updated enfold to version 2.8.1 and added this to the theme functions.php:
add_filter('avia-google-maps-api', '__return_false', 10, 2);
But the problem still exists. How can I disable the Google Maps API call in enfold ?
Regards
Achim
Hey two_worlds!
What is the plugin that you’re using? Please try this on functions.php:
add_filter('avf_load_google_map_api', 'disable_google_map_api', 10, 1);
function disable_google_map_api($load_google_map_api) {
$load_google_map_api = false;
return $load_google_map_api;
}
I’m not sure if this is going to work. I’ll ask Dude to check the thread.
Regards,
Ismael
Hi Ismael,
I am using the wpgeodirectory plugin http://wpgeodirectory.com/
I tested your code and it works perfectly !
Thanks!