Tagged: googlemaps
Hi,
My google map widget on a normal page is not working after reload via the navi when I have a second google map widget included in the footer. The console throws the following error:
Warning: you have included the Google Maps API multiple times on this page. This may cause unexpected errors.
main.js (Zeile 46)
ReferenceError: F is not defined
(57 out of range 48)
Best regards,
Jones
Hey AmbientInnovation!
Please try to insert this code into the functions.php file to fix the issue:
add_filter( 'avia_google_maps_widget_load_api', 'avia_remove_widget_script', 10, 2);
function avia_remove_widget_script($load, $config) {
$content = apply_filters('avia_builder_precompile', get_post_meta(get_the_ID(), '_aviaLayoutBuilderCleanData', true));
if(strpos($content, 'avia-google-maps')) return false;
return true;
}
Regards,
Peter