![]() To add Defer attribute add the following code to your theme’s functions. ![]() The callback parameter executes the initMap function after the API is completely loaded. The script loads the API from the specified URL. Wp_enqueue_script('googleapis', esc_url( add_query_arg( 'key', $gioga_map_api.'&callback=initMap', '///maps/api/js' )), array(), null, true ) Haven't tested them but checked the code and they do pretty fancy stuff with WordPress scripts enqueuing process. With this, inside your theme’s functions.php file: $gioga_map_api = YOUR_API_KEY To add the script in WordPress you need to replace this code: Basically, what the message is saying is that a browser needs to process all of the content inside
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |