This topic has 23 replies, 4 voices, and was last updated 7 years, 8 months ago by Fem.
Viewing 24 posts - 1 through 24 (of 24 total)
We need to add async and defer tag in script link like <script src="https://maps.googleapis.com/maps/api/js?callback=initMap" async defer></script> and in place of initMap, we need to write map initialized function name. async and defer will download the file during HTML parsing
If you can provide us WP Logins to your website with URL then we can take a closer look at it. Make sure you set the post as a private reply so that only admin can see your wp-logins.
Note: Before providing the wp-login to any support staff, kindly please make sure you take a backup of everything including WordPress content, theme options, widgets etc.
Sorry unable to add that as I have no permissions to add the code.
Here is the code you need to add that in your functions.php file
function storeup_add_async_defer_attribute( $tag, $handle ) {
if ( 'gmapmin' !== $handle )
return $tag;
return str_replace( ' src', ' async defer src', $tag );
}
add_filter('script_loader_tag', 'storeup_add_async_defer_attribute', 10, 2);
i have this error in my console :
Uncaught TypeError: jQuery(...).gMap is not a function
at HTMLDocument.<anonymous> ((index):1030)
at i (jquery.js?ver=1.12.4:2)
at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2)
at Function.ready (jquery.js?ver=1.12.4:2)
at HTMLDocument.K (jquery.js?ver=1.12.4:2)
Sorry for the delay in response <script src="https://maps.googleapis.com/maps/api/js?callback=initMap" async defer></script> here previously did you add callback map initialize function name which we used in the theme. Now Add script tag <script src="https://maps.googleapis.com/maps/api/js?key=myKey&callback=initialize" async defer></script> initialize is the function name we used in our theme to initialized google map and in place of mykey add your google map key. Hope this will work for you.
We appreciate your patience and coordination. Is the issue you had resolved? or do you need any further assistance?
We will set the issue to be resolved. If you are still facing the problem please re-open this topic instead of creating a new one.
Aivah Team.
Viewing 24 posts - 1 through 24 (of 24 total)
You must be logged in to reply to this topic.