Hello,
I’m using AIT Theme “businessfinder”. It’s a directory theme with google maps.
And in the functions.php this code loads google maps api:
function aitAdminEnqueueScriptsAndStyles()
{
aitAddScripts(array(
'ait-googlemaps-api' => array('file' => 'http://maps.google.com/maps/api/js?sensor=false&language=en', 'deps' => array('jquery')),
'ait-jquery-gmap3' => array('file' => THEME_JS_URL . '/libs/gmap3.min.js', 'deps' => array('jquery', 'ait-googlemaps-api')),
));
}
add_action('admin_enqueue_scripts', 'aitAdminEnqueueScriptsAndStyles');
Now I created a second custom post_type and I want to put ACF Goole Maps in it.
But because of that loading of the google maps api in the functions.php the Google Maps field of ACF doesn’t work.
When I delete this code:
'ait-googlemaps-api' => array('file' => 'http://maps.google.com/maps/api/js?sensor=false&language=en', 'deps' => array('jquery')),
then ACF Google Maps field work fine!
But then all maps in the backend of the theme doesn’t work.
Where can I disable the Google Maps Api in the plugin files of ACF?
Perhaps this would solve my problem. I think, here is a conflict, because the script is loaded twice.
Or does anybody knows a better working solution?
Best regards,
RaZz