Issue with google maps (functions.php fix included)
-
I had an issue with google maps on non-SSL pages. The site would transform https://www.google.maps/ into https://www.google.maps/maps/. I did not see any UI to fix that up, so I put the following code in functions.php:
// Fix up google maps request in non-https mode add_filter('http_external_url', 'my_http_external_url'); function my_http_external_url ($url) { if (preg_match('/www\.google\.com\/maps\//i', $url)) { $url = str_replace('https://', 'https://', $url); } return $url; }
Hope this helps someone else.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Issue with google maps (functions.php fix included)’ is closed to new replies.