WP Google Weather

by Hendrik Will. 8 Comments

This WordPress plugin displays a weather widget using the unofficial Google weather API.

  • Version: 0.5
  • Last Updated: 2010-8-12
  • Compatible up to: 3.0.1

Features

  • show today’s weather
  • show weather forecast for next 3 days
  • specifiy output language
  • choose between Celsius or Fahrenheit
  • comes with predefined CSS style
  • shortcodes to add the widget on single pages and posts.
  • valid XHTML output

Example

You can see a working example down right in my sidebar.

Backend

Wordpress Backend Widget Options

Frontend

Frontend style

Installation

  1. Unzip and upload files the files to wp-content/plugins/wp-google-weather
  2. Activate the plugin
  3. Go to Themes > Widgets and drag WP Google Weather widget to your sidebar
  4. Specify title, city, country (optional), temperature as Celsius or Fahrenheit and language (ISO 639-1 code)
  5. decide whether it should display only today’s weather or also a 3 day forecast

Shortcode for single pages or posts

Example:

[ wp_google_weather city="new york" temperature="f" language="en" forecast="1" ]

The value for temperature can be c for Celsius, default is f for Fahrenheit. If you want to see the forecast set it to 1, default is 0. Remove spaces after [ and before ].

Frequently Asked Questions

Q: What are ISO 639-1 codes?
A: Two letter codes for the country.

Some examples

USA: us
England: en
Germany: de
France: fr

A complete list of the codes can be found at
http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

Requirements

You need at least PHP5,  WordPress version 2.8 or higher and a theme which support widgets.

Download

WP Google Weather at WordPress.org

8 Responses to WP Google Weather

  1. kapil says:

    hey i like your plugin but i want to know that i am going a city related website and i want to every related city weather in post is it possible.

    to so any city weather with this plugin…
    help me

  2. Stefan says:

    It is a wonderful plug-in. Thank you! The only thing that I would add underneath is a a yellow dot (switch button) from Celsius to Fahrenheit and vice-versa.

  3. Andrew D. says:

    I don’t use widgets so I tried to use the shortcode and it didn’t work. Any advise?

  4. Chantal says:

    I used the shortcode for different pages of my (future) website. It works …… but ….. the layout is not as great as in this website example. The weather image for ‘today’ is to far below and the ‘day’ boxes are to high. So they are more or less mixed true each other.
    Probably I have to make some changes in the original code, but what do I have to change?

    I used the following short code on my webpages.

    [wp_google_weather city="longyearbyen" temperature="c" language="nl" forecast="1"]

  5. Jack says:

    I don’t know if Google updated their API and now your widget is broken but it is no longer working on my website. If you could look into it that would be great. I checked iGoogle and the weather is working fine there so I know they didn’t just abandon it.

    Thanks

  6. olga surodeeva says:

    Hi, I like your plugin expecially because it’s possible to show weather conditions in russian. The only thing I would need it to be able to show 2 lines in the description of the weather as in russian sometime it’s necessary and when it is the second line goes over the temperature.(I hope I was able to expleain the problem) can you modifiy the plugin in this way? Thanks a lot

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>