How do I change this feature of Enfold Google Maps
<script type=”text/javascript” src=”https://maps.google.com/maps/api/js?v=3.24&key=******”></script>
to this
<script type=”text/javascript” data-cfasync=”false” src=”https://maps.google.com/maps/api/js?v=3.24&key=******”></script>
Hi web_kings!
You will have to edit and modify the code, to the different areas we are using it.
The best case scenario is to hire a freelancer, who will be able to help you.
Thanks a lot
Regards,
Basilis
I can edit the code myself, It should just be a simple template hack. Was hoping you could just point out what template it was to save me time.
Hey!
You can find it in enfold/config-templatebuilder/avia-shortcodes/google_maps.php, it should be in line 31-50:
function extra_assets()
{
if(is_admin() && isset($_POST['action']) && $_POST['action'] == "avia_ajax_av_google_map" )
{
$prefix = is_ssl() ? "https" : "http";
$api_key = avia_get_option('gmap_api');
$api_url = $prefix.'://maps.google.com/maps/api/js?v=3.24';
if($api_key != ""){
$api_url .= "&key=" .$api_key;
}
wp_register_script( 'avia-google-maps-api', $api_url, array('jquery'), NULL, true);
$load_google_map_api = apply_filters('avf_load_google_map_api', true, 'av_google_map');
if($load_google_map_api) wp_enqueue_script( 'avia-google-maps-api' );
}
}
Hope this helps.
Cheers!
Nikko
Many thanks Nikko, much appreciated
Hey!
Glad we could help :)
Regards,
Nikko