Frontend style

This is my first Wordpress plugin. It displays a weather widget using the unofficial Google weather API.

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
  • valid XHTML output

Example

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

Requirements

You need at least Wordpress version 2.8 or higher and a theme which allows widgets.

Download

For more information have a look at the plugin page or directly go to plugin page at wordpress.org.


56 Comments on “Wordpress plugin WP Google Weather Widget released – Feedback please”

You can track this conversation through its atom feed.

  1. Dietmar sagt:

    Bug-Report:

    Description: Include not found in wp-google-weather.php line 11

    /*
    * require_once(‘wp-includes/formatting.php’);
    */

    Solution:

    require_once(ABSPATH . WPINC . ‘/formatting.php’);

    1. Hendrik Will sagt:

      Thanks Dietmar! Weird, I didn’t get this error on my installations.

  2. Wordpress plugin WP Google Weather Widget released – Feedback … – Wordpress Plugins sagt:

    [...] here: Wordpress plugin WP Google Weather Widget released – Feedback … | More Categories: Wordpress Plugin Tags: a-weather-widget – api – delete-and – [...]

  3. Mike sagt:

    Hi Hendrik,

    Everything looks great, except whatever measure I choose for the temperature, it always shows Fahrenheit for the 3-day forecast (today’s temperature is as desired). I’m using Arclite theme, don’t think I’m doing anything wrong…!
    Thanks,
    Mike

    Update: I fixed the bug. Please, grab version 0.2 at http://wordpress.org/extend/plugins/wp-google-weather/ or use the auto upgrade.

  4. kilroy sagt:

    How can I add this widget directly into blog post? I need to create a list of weather for multiple areas all in one post.

    Thank you for taking the time to create.

    1. Hendrik Will sagt:

      Right now it just works as a widget. I might add this feature to one of the next versions.

  5. Tim sagt:

    Nice job!
    Congrats on your first WP-Plugin!
    I’ll check it out after building my house today :-D

  6. Danny sagt:

    Hi There,

    when installing this widget/plugin (thanks by the way!) it seems to be working, however the layout is nothing like your screen shot? Is it something on my side?

    Please advise.

    Danny

    1. Hendrik Will sagt:

      Please, check if my additional css gets loaded in your header.

  7. Colin sagt:

    Hi great plugin. It works well on my site BUT is there a list of the cities that can be used anywhere? The reason I ask this is that the forecast in the plug-in is very different to that on the Spanish Met Office website.

  8. Colin sagt:

    PS I should also have asked is it possible to get a 5 day rather than 3 day forecast?

    1. Hendrik Will sagt:

      I don’t think there is any list of available cities. 5 day forecast is not possibil with google weather api so far.

  9. Ron Agatep sagt:

    Hi. I installed your weather widget. Drag the widget to the right side. Did not cahnge anaything like title and city. But it does not work. Only showing is the title. What am I doing wrong. Please help. Thanks.

    1. Hendrik Will sagt:

      Right now it only supports CURL to fetch the xml data. Probably CURL is not installed on your webserver?

  10. Joe sagt:

    I am having the same problem as “Danny” was with this widget: There is no layout formatting when displayed on my page.
    You advised to: “Please, check if my additional css gets loaded in your header.” What does that mean? How can I fix this?

    Thanks for you help in advance! :)

    -Joe

    1. Hendrik Will sagt:

      Thank for the error report. I just updated the plugin and added a extra div wrapper to fix the layout problems with some templates.
      You can get a new version a the Wordpress plugin page or just use the auto updater of Wordpress.

  11. James sagt:

    Hi There – great idea for a widget :-)

    Unfortunately I’m getting a rather strange error which happened with 0.2 and is still happening with 0.3. I’ve tried this with my custom theme and WP default theme and the same thing happens.

    There’s a PHP error which means the widget doesn’t display, and it screws with the layout of the page.

    Here’s the error I get:

    Fatal error: Call to undefined function: simplexml_load_string() in /site/wp-content/plugins/wp-google-weather/wp-google-weather.php on line 164

    Any help in fixing this would be greatly appreciated!

    Keep up the good work!

    1. Hendrik Will sagt:

      This error means that you don’t have installed the simplexml php extension.

      Create a phpinfo file and have a look for the string ’simplexml’. If it won’t appear somewhere on page page you should contact your webhost and ask for simplexml php extension.

  12. will sagt:

    hi..is it possible to have maybe the country weather ie i need weather map of all of United kingdom..is this possible?

    1. Hendrik Will sagt:

      No, this isn’t possible. This would be a special application.

  13. Ron Agatep sagt:

    Hi Hendrik,

    I cannot get your widget to work on my website. I followed the instruction and I get only the title when I activate and enable the widget to sidebar 1. I have WP v2.8.3. Any ideas?

    Thank you in advance for your assitance.

  14. Thomas sagt:

    Plugin works great, but please consider some kind of caching for the weather data.

    1. Hendrik Will sagt:

      @ron please be sure to use php5 and the simplexml php module

      @thomas thanks, it’s already planned since v0.1 but I didn’t have time to implement it yet ;-) I’m using wp super cache a lot for general wp caching.

  15. idntt sagt:

    Plugin works fine on WP v 2.8.3. Thanks for sharing. Only problem I have is that weather widget is aligned to the left on the sidebar, I will like to have it centered. Any tips?

  16. Monchu sagt:

    Hi Hendrick,
    First of all, congratulation for this nice and useful widget.
    I would have 2 suggestions :
    - The french description of the weather conditions takes sometimes 2 lines (for instance : “Couverture nuageuse partielle”) and the second line mixes with the temperature below : would it be possible to adjust the height first blue field to the number of lines ?
    - We are a sailors group, and we are very much interested in wind speed and direction (as shoxn in Google Mete) ?
    THanks again and regards,
    Emmanuel (F-Lyon)

  17. Frank sagt:

    Hi,

    Hello aus Kanada!

    Danke for the great widget!

    One minor request.. can you add support for click on the widget and go to the full weather report?

    Thanks

    Frank

  18. Kerry Webster sagt:

    Is there a way to make this work without using as a widget. I would like to place the code directly in a theme without having to require the user to activate the widget.

    Thanks. Awesome plugin.

  19. Mike sagt:

    By far the best visual looking wordpress weather plugin.

    Suggestion: Make it so the output auto re-sizes based on the sidebar width, ie 150, 300 and so on.

  20. alan telford sagt:

    Hi Hendrick,

    great widget, two comments however
    1) The image for today’s weather (next to today’s temperature) seems to giving an invalid image reference (just http://www.google.com)
    2) it would be nicer if it was centered in the column

    thanks again

    Alan
    (wp 2.8.4 ) using the latest version of your widget (0.3)

  21. alan telford sagt:

    Hendrick,

    the missing graphic has turned up now, so don’t worry about that. Don’t know why it wasn’t there before.

    regards

    Alan

  22. lisa sagt:

    this looks to be a great plugin, but i’m having problems activating it. when i do, i get this error:

    Plugin could not be activated because it triggered a fatal error.

    Fatal error: Class ‘WP_Widget’ not found in D:\Inetpub\wwwroot\resweb\wp-content\plugins\wp-google-weather\wp-google-weather.php on line 41

    any help is much appreciated.

  23. Webbie sagt:

    I got the plugin working, but how can I center it on my plugin, take a look at http://www.vvor4.nl.

    Tnx in advance!

  24. Studio5150 sagt:

    Nice plugin, but can I display this plug-in without sidebar? thx

  25. Hendrik Will sagt:

    @idntt, Webbie: edit your css

    @Monchu, Frank:thanks, I will add this to my to-do list

    @Kerry Webster, Studio5150: this is planned for an upcoming release

    @lisa: you need at least WP v2.8

  26. Cameron sagt:

    Hi, I have tried to use the plugin on a couple of sites.
    I seems to have 2 issues.

    1st. The weather description for today is not displaying and the weather image for today is not showing.

    2nd , on another 2 sites, todays weather image displays below todays temp rather than beside it.

    The 2nd problem is minor, but we need to get the 1st issue resolved.

    Wordpress version is 2.8.4
    other wise great.

  27. Lou sagt:

    Hi Hendrik :)

    Big thanks for the plugin!

    Question:
    The top blue bar doesn’t display the white text
    and beside todays’ temperature, there’s an icon missing.

    Otherwise all else displays and works fine.

    Would you be able to suggest what I need to adjust, please?

    Thank you…Lou

  28. Wayne sagt:

    I’m getting this error:

    Fatal error: Call to undefined function: simplexml_load_string() in /home/ilderton/public_html/fireblog/wp-content/plugins/wp-google-weather/wp-google-weather.php on line 164

    Any thoughts??

  29. MicK sagt:

    Hi, I am to having the icon and top current condition go missing. They are there when first install the last something like 15-20 minutes before vanishing, any ideas?

  30. Vicky sagt:

    This widget is lovely. Is there a function I can call so that I can use it in a template instead of a widget?

  31. Ray sagt:

    Hi Hendrik,

    Just installed your Wordpress Weather Plugin and it works great.

    Many thanks for your great work!

    Regards,

    Ray

  32. Henri sagt:

    Hello, I just found your weather thing and it looks great.
    But , and I am not a programmaer, can I only put the centigrade option instead of both?
    And how can I do that.
    Thank you in advance

  33. Carolinestar sagt:

    Hi there, love this plugin. Works very well. I have one question: How do I get the Icon to appear for Today’s Weather beside the Temperature. All other 3 icons appear no problem for the forecast. Does anyone know how to fix this?
    Many thanks
    Carolinestar

  34. Franz Frühwirth sagt:

    @Ron Agatep
    If your Provider doesn’t support curl lib (fatal error using function curl_init …) you can use this Code.

    $output = file_get_contents($xmlUrl);

    instead of:

    // create a new cURL resource
    $ch = curl_init();
    // set URL and other appropriate options
    curl_setopt($ch, CURLOPT_URL, $xmlUrl);
    curl_getinfo($ch);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

    // grab URL and pass it to the browser
    $output = curl_exec($ch);

    // close cURL resource, and free up system resources
    curl_close($ch);

    not so sophisticated but it works ;)
    @Hendrik gratz 4 your this fine PlugIn. It works very fine with WP 2.8.6 (with the little change)

  35. Brian sagt:

    Fatal error: Call to undefined function: simplexml_load_string() in /home/budgetbounce/budgetbouncehouse.com/wp-content/plugins/wp-google-weather/wp-google-weather.php on line 164

    Any solutions/ideas??

  36. Maria sagt:

    I’d like something like this that I can add to specific pages on my blog with a different city on each page. I know I can use Exec-PHP to get the code to work on the page; I just need the customizable code to insert. Please add this in a future version. Your format is exactly what I’m looking for: clean and compact.

  37. Alex sagt:

    hi – thanks for the plugin, it looks great

    What would i need to alter in the CSS to move the whole display to centre aligned? i’ve played around with the settings but cannot get the entire plugin to change from left aligned to centre aligned

  38. Evie Stewart sagt:

    LOVE this plugin, it’s beautiful, so so perfect for my blog, but I was told to deactivate it from my sidebar cause it was slowing the load.

    SO I’d LOVE to put it on my BEST OF L.A. page content (so it only loads when that page is seen, not on the home/index sidebar) —

    I know Kerry and some others have asked for what I need — but until you get a chance to make that new version, can you give us a workaround? Code to pop into the content? Anything? I can do it (and have techie pals) so I won’t bug you for a bunch of support… pretty-please?

    Thanks, if it were up you’d see how perfectly it goes with my site — yay (IF I can use it in a page…)

    @EvieStewart

  39. Ray sagt:

    Hi Hendrik,

    I have the same problem as a number of other users of your great plugin.

    Sometimes the ‘current’ condition wording and image display but most of the time they do not.

    The forecast for the other 3 days works perfectly.

    Would you please advise how this can be fixed as it makes the plugin virtually unusable for me?

    Many thanks in advance.

    Regards,

    Ray

  40. Ovidiu sagt:

    Wonderful plugin! I was looking for something like this, based on that simple API from Google, for months now.

    Thank you very much!

  41. Hendrik Will sagt:

    Thanks a lot for all feedback!

    I’ll try to update during the next weeks.

  42. Marty sagt:

    I’d also really like to see template tags. I rarely use widgets, as I develop my own custom themes from scratch. Best looking weather plug though.

  43. Andy T sagt:

    Hendrick

    Great plugin!! Nice and clean.

    It would be nice if a guest could put in their own location and get the weather for their area.

    The reason I would like this is that I’m doing a site on lawn care and for this a lot of the advice revolves around the weather.

    Any thoughts?

    Regards, Andy T

  44. tia sagt:

    Without thinking, I upgraded to latest wp 2.9.2 the plugin is no longer working in 2,9.2 Any plans to update? Love the plugin and would love to see it working on latest wp.
    Many Thanks

  45. Seb sagt:

    Hello Hendrick,

    Thanks for making this great plugin available.

    I’ve found that when I add the short code for it to a page or post, the weather box always appears at the top of the content area – no matter where I place it in the body.

    It’s not a css issue. The html is always generated directly after the post’s title. Any clues?

    Thanks

  46. David sagt:

    Hi, great plugin – thank you. We’d like to change the layout so that the next 3 days weather (which is currently under ‘today’s weather’) displays beside. Total width of 300 px. If you could help or have any advice would be much appreciated.

    Our site is not yet published but if you need to look I can send you a login/password. Please email me.

    Thanks for any help!

    Kind regards,

    David

  47. Mike sagt:

    Could you make this a 5 day forcast widget…that would be perfect. And may be a way to choose static, 3-day, or 5-day??? Thanks.

Einen Kommentar hinterlassen

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