On two pages of a website I have a google maps coded via iframe like so:

<iframe src="https://www.google.com/maps/embed?pb=rest-of-link" width="100%" height="300" frameborder="0" style="border:0"></iframe>

The problem is I'm getting mixed content warnings on those pages and they are caused by a script tag in the header which looks like this:

<script type='text/javascript' src='http://maps.googleapis.com/maps/api/js?sensor=false&#038;ver=4.7.5'></script>

I've looked through header file in the theme files, my page theme files and haven't found the script tag anywhere. There are no additional google maps plugins either.

Do you have any ideas where I could look for that or otherwise change the link to have https in url?

ps. I didn't create the website but I am maintaining it

  • 1
    Have you checked for wp_enqueue_script statements in your theme files? Or just searched for "maps.googleapis.com" or so? You might also be able to locate the script's origin using Chrome Inspector or similar tool. – CK MacLeod Jun 20 '18 at 7:31
  • A side-wide search for the string "4.7.5" will expose the culprit – mayersdesign Jun 20 '18 at 7:31
  • @mayersdesign it helped thanks, and indeed, as CK MacLeod suggested it was wp_enque_script adding the link – aMJay Jun 20 '18 at 9:00

You can install HTTP/HTTPS Remover plugin to fix the issue. Generally, it works with all the plugins and themes.

You can download and install the plugin from https://wordpress.org/plugins/http-https-remover/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.