Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #285722

    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

    • This topic was modified 10 years, 4 months ago by two_worlds.
    #286507

    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

    • This reply was modified 10 years, 4 months ago by Ismael.
    #286709

    Hi Ismael,

    I am using the wpgeodirectory plugin http://wpgeodirectory.com/

    I tested your code and it works perfectly !

    Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Google Maps API Multiple Times in backend’ is closed to new replies.