Skip to content

Instantly share code, notes, and snippets.

@albionselimaj
Created February 16, 2018 17:25
Show Gist options
  • Save albionselimaj/e7bb85d7c906173272ded698200e802a to your computer and use it in GitHub Desktop.
Save albionselimaj/e7bb85d7c906173272ded698200e802a to your computer and use it in GitHub Desktop.
Google Maps Fix
// 1. Install and activate MyListing child theme
// 2. In WP Admin > Appearance > Editor, add the below code in functions.php file, at the end of the file.
add_action( 'wp_enqueue_scripts', function() {
wp_deregister_script( 'c27-google-maps' );
wp_enqueue_script( 'c27-google-maps', 'https://maps.googleapis.com/maps/api/js?key=' . c27()->get_setting('general_google_maps_api_key') . '&libraries=places&v=3', [], null, true );
}, 100 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment