I am trying to install the SPOT Widget 2.0 in the sidebar of my blog posts.
After briefly flashing the map, It keeps returning an JS error.
(it’s the second widget down in the right column)
http://wonderofwander.com/florida_keys-gloucester_ma/
I’ve tried installing the Google Maps API key a couple of different ways, using both No Restrictions and HTTP restrictions.
1) via a couple of different Plug-ins
2) via the Theme Panel>Custom Code>Custom Java Script
I do not believe I used the code correctly in #2 as I’d get an “x” next to the line, but I am not sure how to remove the <script></script> properly from the code as per your instructions.
This was the code I was putting in there with the “YOUR_API_KEY” replaced with my actual API key.
<script async defer src=”https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap”
type=”text/javascript”></script>
Any thoughts on what I am doing wrong or how to code it properly for Step 2?
Hello,
Sorry but this falls beyond what the theme support can offer you. The plugin you mention is not tested and the theme does not have any implementation for google maps. You will have to find a different plugin that will work properly as plugin implementation is not part of the theme support.
Thank you!
Are you able to tell me the proper way to add the script to the Custom JS section?
Perhaps if I get that added in there properly, I can make it work, but the instruction don’t seem to be clear to me
Hello,
Unfortunately this specific code will not work from the theme custom js box as all the code is needed. Add it according to the script provider instructions. Try to add the code on a page in a custom js element to test it if it;s at least working properly: https://www.screencast.com/t/tvx6OP3QIVJ
If the code works like that you can then implement it on posts using a do_shortcode function in the php code of the theme files: https://developer.wordpress.org/reference/functions/do_shortcode/
Thank you!
Thank You, I found that SpotWalla which incorporates SPOT data into their maps worked beautifully so I switched to their code instead.
