Support » Plugin: Woody code snippets - Insert Header Footer Code, AdSense Ads » Google Street view containers in universal snippet

  • Hello, I’ve tried to insert a Universal snippet in the product page of a woocommerce site in test.

    I use Geo Mashup plugin for the coordinates of the product and I’ve a php script that already works for the openweathermap API with a Woody PHP snippet and I insert it in the google code that you can see here to get lat and lon

    with this code in the Universal snippet insert in the product pages I don’t see nothing (no error and no Street view containers)

    <html><head><script src=""></script>
        <style type="text/css">
          body {
            height: 100%;
            margin: 0;
            padding: 0;
          #pano {
            float: left;
            height: 100%;
            width: 50%;
          "use strict";
    $lat =1;
    $lon =2;
    if (function_exists('geo_mashup_map')) {
    $coords = GeoMashup::post_coordinates(); 
    if ($coords) { $lat = $coords['lat']; $lon = $coords['lng'] ; }
    $js ="function initialize() {
      const fenway = { lat: $lat, lng: $lon };
      const map = new google.maps.Map(document.getElementById(\"map\"), {
        center: fenway,
        zoom: 14
      const panorama = new google.maps.StreetViewPanorama(
          position: fenway,
          pov: {
            heading: 34,
            pitch: 10
    echo do_shortcode($js); 
        <div id="map"></div>
        <div id="pano"></div>

    Can you help me?
    Thank you,

Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Google Street view containers in universal snippet’ is closed to new replies.