Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Enqueue Google Maps API and our script to initialise the map
<?php
wp_register_script( 'pw-google-maps-api', 'https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false', null, null, true );
wp_enqueue_script( 'pw-store-locations', get_stylesheet_directory_uri() . '/js/store-locations.js', array( 'jquery', 'pw-google-maps-api' ), null, true );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment