Title: Static Code Block?
Last modified: March 18, 2021

---

# Static Code Block?

 *  Resolved [aggieoutlaw8](https://wordpress.org/support/users/aggieoutlaw8/)
 * (@aggieoutlaw8)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/static-code-block/)
 * You have a great plugin!
    We are trying to use this in a static code block. Do
   you have any suggestions to make it work?
 * Thanks!
    -  This topic was modified 5 years, 2 months ago by [aggieoutlaw8](https://wordpress.org/support/users/aggieoutlaw8/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [David Matthew](https://wordpress.org/support/users/davidmatthew/)
 * (@davidmatthew)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/static-code-block/#post-14208984)
 * Hi aggie,
 * Do you mean in a Custom HTML block? If so, you could use either the widget or
   the shortcode to embed it on a page, and then copy the generated iframe code (
   using your browser’s inspector tool – usually available when you right-click 
   something). For example, the generated iframe code behind the widget I have [embedded here](https://davidmatthew.ie/ventus-1-1-released/)
   is below:
 * `<iframe style="box-sizing: border-box; width: 100%; height: 350px; border-radius:
   20px" src="https://embed.windy.com/embed2.html?lat=53.199&lon=-7.603&zoom=8&overlay
   =cosc&marker=&pressure=&detailLat=53.199&detailLon=-7.603&metricWind=default&
   metricTemp=°C&detail=true&calendar=now&product=ecmwf&level=surface&menu=&message
   =true&type=map&location=coordinates&radarRange=-1" frameborder="0"></iframe>`
 * > You have a great plugin!
 * Thanks a million, really appreciate it! 🙂
 * Hope this helps.
 * Thanks,
    David
 *  Thread Starter [aggieoutlaw8](https://wordpress.org/support/users/aggieoutlaw8/)
 * (@aggieoutlaw8)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/static-code-block/#post-14218497)
 * Thanks for your reply! How would we use the lat long from the post itself? Also
   is there an issue with Chrome? We have to reload the page a few times to get 
   the forecast etc.
 * Thanks again!
 *  Plugin Author [David Matthew](https://wordpress.org/support/users/davidmatthew/)
 * (@davidmatthew)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/static-code-block/#post-14225432)
 * Hey aggie, if you have to reload a few times there might be some browser or server
   caching going on, it’s hard to say. I haven’t experienced that on my own site.
 * > How would we use the lat long from the post itself?
 * I’m not fully sure what you mean here? The easiest way to get whatever latitude
   and longitude you need would actually be to go straight to windy.com and make
   note of the first two numbers after the URL, e.g. [windy.com/?53.338,-6.259](https://www.windy.com/?53.338,-6.259);
   you can use these as your arguments then in the iframe src URL, like so:
 * `lat=53.338&lon=-6.259`
 * Hope this helps!
    -  This reply was modified 5 years, 2 months ago by [David Matthew](https://wordpress.org/support/users/davidmatthew/).
    -  This reply was modified 5 years, 2 months ago by [David Matthew](https://wordpress.org/support/users/davidmatthew/).
 *  Thread Starter [aggieoutlaw8](https://wordpress.org/support/users/aggieoutlaw8/)
 * (@aggieoutlaw8)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/static-code-block/#post-14225455)
 * David,
    Thanks for your response! Well for our site the listings are using Lat
   Long to display the location of the listing so we use this shortcode in the shortcode
   block…
 * [ventus width=”100%” height=”350px” radius=”20px” lat=”[[location.lat]] ” lon
   =”[[location.lng]] ” zoom=”14″ layer=”radar” scale=”F” units=”mph” marker=”true”
   forecast=”false” time=”24″]
 * In the static code block we cannot use the brackets for LAT/Long so I was wondering
   if you had a workaround? Our theme lets us assign listing packages so we wanted
   to make the weather block a premium feature which we can’t do without using the
   static block.
 *  Plugin Author [David Matthew](https://wordpress.org/support/users/davidmatthew/)
 * (@davidmatthew)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/static-code-block/#post-14225521)
 * Ah ok, thanks for clarifying aggie. I don’t have a workaround for this I’m afraid.
   You might need some custom JavaScript for this, maybe using the Geolocation API?
 * [Mozilla Docs – Geolocation API](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation_API)

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Static Code Block?’ is closed to new replies.

 * ![](https://ps.w.org/weather-map-widget/assets/icon.svg?rev=2137405)
 * [Ventus - Weather Map Widget & Shortcode](https://wordpress.org/plugins/weather-map-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/weather-map-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/weather-map-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/weather-map-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/weather-map-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/weather-map-widget/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [David Matthew](https://wordpress.org/support/users/davidmatthew/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/static-code-block/#post-14225521)
 * Status: resolved