KevinM1990112qwq KevinM1990112qwq - 6 months ago 7
PHP Question

Wordpress Google Map API issue

I keep getting this error in the debugger.

You have included the Google Maps API multiple times on this page

I am not finding where in WordPress to correct it. Biggest issue is. I am using appearance -> editor -> cant find where API is.

I think this is whats stopping my map from loading. All plugins are up to date.

url is:

Thanks for any help.


It's hard to see the problem, as I can't dismiss the "You must be over 21 to enter this site" popup, due to a number of other javascript errors. Might be worth clearing your cache (or visiting the page in Private Browsing mode) if you can't see what I'm talking about.

However, looking at the page source, you have this

<script type='text/javascript' src=';ver=4.4.37'></script>

at the top, and this:

<script type="text/javascript">
    var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
    document.write(unescape("%3Cscript src='" + gmapsJsHost + ",places' type='text/javascript'%3E%3C/script%3E"));

both of which load the same code. Looking at this line:

<link rel='stylesheet' id='wpgmaps-style-pro-css'  href='' type='text/css' media='all' />

makes me think one of them comes (I can't be sure which one) from a plugin called wp-google-maps-pro.

The one added with document.write() looks like it's changed since I looked at it this morning (I'm pretty sure it didn't have the places argument), so perhaps you know the source of it.

Either way, the easiest way to find the two places would be to search all your source code (I assume your editor can do a recursive search of all PHP files) for the string and go from there.