What is a weather widget?
A weather widget is a small box on your website that shows the current temperature, conditions and the forecast for the coming days. Visitors get the information right where they are, without opening another website.
It is especially useful for travel and tourism blogs, hotels and guesthouses, local news, real estate and event sites, and any business whose customers care about the weather in a particular place.
How to add it to your site
Adjust the settings above and press Copy code. Then follow the steps for your platform:
- In the page or post editor, add a Custom HTML block.
- Paste the code into the block.
- Update or publish the page.
- Open the HTML file of your page.
- Paste the code where the widget should appear.
- Save the file and upload it to your server.
- Choose Add › Embed code › Embed HTML.
- Paste the code and place the box on the page.
- Publish your site.
- Go to Layout › Add a Gadget › HTML/JavaScript.
- Paste the code.
- Save.
Features
One city or a whole country
In One city mode the widget shows the city you pick. If you enable Visitors can change the city, a small search appears in the widget so each visitor can switch to their own city.
In Country mode visitors choose from that country's city list: all 81 provinces for Turkey and up to 100 of the largest cities for other countries. The chosen city is remembered in the visitor's browser and shown again on the next visit.
Where does the data come from?
Forecasts come from the Norwegian Meteorological Institute (MET Norway) under the CC BY 4.0 licence. Data is cached on our servers and refreshed when MET Norway publishes a new forecast, so your visitors' browsers never contact a third party. City lists are based on GeoNames data.
Frequently asked questions
Is the weather widget free?
Yes. It is completely free and needs no sign-up or API key.
Can I show several cities?
Create a separate code for each city and place them side by side on your page, or use country mode and let visitors choose.
How often is the data updated?
Forecasts are refreshed as MET Norway publishes new data; each location is kept in our cache for at least 30 minutes between updates.