Title: Map Not Loading In Google Maps JavaScript API page
Last modified: August 31, 2016

---

# Map Not Loading In Google Maps JavaScript API page

 *  [andygo12](https://wordpress.org/support/users/andygo12/)
 * (@andygo12)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/map-not-loading-in-google-maps-javascript-api-page/)
 * Hello,
 * I have a properly functioning map example here:
 * [http://roadtripsharing.com/plan-a-road-trip-js](http://roadtripsharing.com/plan-a-road-trip-js)
 * (not WordPress)
 * but when I paste the code into a blank WordPress page the map doesn’t appear:
 * [http://roadtripsharing.com/plan-a-road-trip](http://roadtripsharing.com/plan-a-road-trip)
 * I tried it with different themes and domains and removing the head/body/doctype
   tags. I made a header.php file for my child theme just not sure which code to
   put where. (Source can be viewed in the first link.)
 * I tried pasting all script EXCEPT
 *     ```
       <script async defer
           src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBwRFMrx8py8-fTxdSrHQKRAU0Prg5mio4&callback=initMap">
           </script>
       ```
   
 * into customizer custom js and that did not make the map show.
 * I noticed the page also did not work when I pasted it all into js fiddle but 
   I did not separate the html, css, and js from each other, only pasted them into
   the html field. The error message that comes up is that “The page was unable 
   to display a Google Maps element.”
 * I’ve read docs and forum threads about enqueue just not sure how to use it or
   something else to make the js work. Should I make a folder roadtripsharing.com/
   script and then put a js file in there, then use enqueue to link to it? If so
   what would the syntax be, to add to header.php or functions.php and/or elsewhere?
 * Thanks!

The topic ‘Map Not Loading In Google Maps JavaScript API page’ is closed to new 
replies.

## Tags

 * [enqueue](https://wordpress.org/support/topic-tag/enqueue/)
 * [header.php](https://wordpress.org/support/topic-tag/header-php/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [andygo12](https://wordpress.org/support/users/andygo12/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/map-not-loading-in-google-maps-javascript-api-page/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
