• Okay I have a google map javascript code I want to insert into my homepage (I also have seperate maps for each of my other pages I will need to insert).

    I am struggling with this and nothing is working for me. I have my java file in my host server as map_script.js
    First, with this should it just be my java code? or should it have the <script>Insert Java code here</script>? At the end of the code is the code with my API key, how do I add that to my java code? or does that just get added to my homepage html?

    Second, where do I go from here? I have read the wordpress page with enqueue and tried this, but it just doesnt seem to work for me. Does anyone have a better resource as to how to do this enqueue process or can explain it to me better?

Viewing 16 replies (of 16 total)
  • Thread Starter plet9090

    (@plet9090)

    I have edited some things, but now

    Any page I don’t have my [cutsom-map-shortcode], the page loads with Error Code: InvalidKeyOrUnauthorizedURLMapError. I have gone through the google api and registered and verified my site. That can’t be it.

    I looked at my page source and saw there was a line break in my api key code, however if I try to retype or delete the break, it wont work. That could be what is stopping it, but it wont let me edit it.

Viewing 16 replies (of 16 total)

The topic ‘Javascript into WordPress’ is closed to new replies.