83 Comments on “Wordpress plugin WP Google Weather Widget released – Feedback please”
You can track this conversation through its atom feed.
Mostly web dev, sometimes food.
Posted by Hendrik Will on Montag, Juli 27, 2009 at 9:28 PM. 83 Comments.

This is my first Wordpress plugin. It displays a weather widget using the unofficial Google weather API.
You can see a working example down right in my sidebar.
You need at least Wordpress version 2.8 or higher and a theme which allows widgets.
For more information have a look at the plugin page or directly go to plugin page at wordpress.org.
You can track this conversation through its atom feed.
I'm Hendrik Will and this is my personal blog. I work as a freelance web developer for several companies in Germany. Here you can read about my technical interests which mostly relate to CSS, XHTML, PHP, MySQL and jQuery. I'm specialized in TYPO3 and ZEND Framework.



“Hi there. I'm using your weather plugin. It did work for a long time, but now it shows an enormously ...”
— Eivind on Wordpress plugin WP Google Weather Widget released – Feedback please
Grab an Atom feed:
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’);
Posted on 27/07/2009 um 10:33 PM.
Thanks Dietmar! Weird, I didn’t get this error on my installations.
Posted on 27/07/2009 um 10:47 PM.
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 – [...]
Posted on 28/07/2009 um 1:32 AM.
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.
Posted on 28/07/2009 um 1:50 PM.
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.
Posted on 28/07/2009 um 10:10 PM.
Right now it just works as a widget. I might add this feature to one of the next versions.
Posted on 28/07/2009 um 10:26 PM.
Nice job!
Congrats on your first WP-Plugin!
I’ll check it out after building my house today
Posted on 29/07/2009 um 9:21 AM.
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
Posted on 01/08/2009 um 4:28 PM.
Please, check if my additional css gets loaded in your header.
Posted on 02/08/2009 um 6:51 PM.
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.
Posted on 06/08/2009 um 10:02 AM.
PS I should also have asked is it possible to get a 5 day rather than 3 day forecast?
Posted on 06/08/2009 um 10:03 AM.
I don’t think there is any list of available cities. 5 day forecast is not possibil with google weather api so far.
Posted on 06/08/2009 um 9:52 PM.
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.
Posted on 06/08/2009 um 11:12 PM.
Right now it only supports CURL to fetch the xml data. Probably CURL is not installed on your webserver?
Posted on 07/08/2009 um 6:53 PM.
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
Posted on 09/08/2009 um 9:52 PM.
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.
Posted on 09/08/2009 um 11:16 PM.
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!
Posted on 10/08/2009 um 10:16 PM.
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.
Posted on 10/08/2009 um 10:27 PM.
hi..is it possible to have maybe the country weather ie i need weather map of all of United kingdom..is this possible?
Posted on 11/08/2009 um 3:49 PM.
No, this isn’t possible. This would be a special application.
Posted on 11/08/2009 um 9:00 PM.
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.
Posted on 12/08/2009 um 8:55 PM.
Plugin works great, but please consider some kind of caching for the weather data.
Posted on 12/08/2009 um 10:20 PM.
@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.
Posted on 12/08/2009 um 10:49 PM.
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?
Posted on 13/08/2009 um 4:23 AM.
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)
Posted on 17/08/2009 um 6:03 PM.
Hi Emmanuel,
You can change the height of by editing wp-google-weather.css:
Line 22 change to “height: 80px”
Line 32 change to “height: 44px”
And you can also reduce the font size at line 31
Hope this helps
Aymeric
Posted on 14/07/2010 um 4:55 PM.
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
Posted on 24/08/2009 um 6:34 AM.
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.
Posted on 27/08/2009 um 5:23 AM.
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.
Posted on 04/09/2009 um 2:12 PM.
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)
Posted on 08/09/2009 um 1:57 PM.
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
Posted on 08/09/2009 um 4:40 PM.
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.
Posted on 11/09/2009 um 12:11 AM.
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!
Posted on 12/09/2009 um 9:57 AM.
Nice plugin, but can I display this plug-in without sidebar? thx
Posted on 14/09/2009 um 5:52 PM.
@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
Posted on 19/09/2009 um 12:14 AM.
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.
Posted on 24/09/2009 um 11:54 PM.
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
Posted on 27/09/2009 um 11:01 PM.
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??
Posted on 03/10/2009 um 5:39 PM.
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?
Posted on 19/10/2009 um 3:58 PM.
This widget is lovely. Is there a function I can call so that I can use it in a template instead of a widget?
Posted on 27/10/2009 um 3:45 PM.
Hi Hendrik,
Just installed your Wordpress Weather Plugin and it works great.
Many thanks for your great work!
Regards,
Ray
Posted on 07/11/2009 um 7:04 AM.
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
Posted on 20/11/2009 um 10:33 PM.
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
Posted on 26/11/2009 um 10:49 AM.
@Ron Agatep
If your Provider doesn’t support curl lib (fatal error using function curl_init …) you can use this Code.
instead of:
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)
Posted on 10/12/2009 um 8:40 PM.
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??
Posted on 15/12/2009 um 6:30 AM.
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.
Posted on 29/12/2009 um 12:51 AM.
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
Posted on 03/01/2010 um 2:07 PM.
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
Posted on 07/01/2010 um 3:23 AM.
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
Posted on 15/01/2010 um 6:27 AM.
Wonderful plugin! I was looking for something like this, based on that simple API from Google, for months now.
Thank you very much!
Posted on 01/02/2010 um 11:42 PM.
Thanks a lot for all feedback!
I’ll try to update during the next weeks.
Posted on 03/02/2010 um 11:28 PM.
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.
Posted on 05/02/2010 um 8:47 PM.
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
Posted on 07/02/2010 um 10:58 AM.
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
Posted on 20/02/2010 um 4:43 PM.
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
Posted on 23/02/2010 um 9:30 AM.
Maybe in this case (shortcode) is problem in buildWidget function (using echo instead return)
Posted on 29/03/2010 um 11:18 AM.
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
Posted on 23/02/2010 um 9:54 AM.
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.
Posted on 25/02/2010 um 6:25 AM.
Hi there,
Im kind of disapointed the Sudbury Ontario Canada is not part of the possible options for the weather gadget. Any ideas on how to add it?
Posted on 28/02/2010 um 2:48 AM.
Hi, great plugin, thanks!
I’ve found that, to make the shortcode to work, I have had to capture the widget class output and return it in the shortcode function, as follows:
function hw_wp_gw_shortcode($atts, $content = null) {
extract(shortcode_atts(array(
"city" => 'Braunschweig, Germany',
"temperature" => 'c',
"language" => 'en',
"forecast" => 'true'
), $atts)
);
$hw_wpgw = new hw_wpgw();
ob_start();
$hw_wpgw->buildWidget($city, $temperature, $language, $forecast);
$output = ob_get_contents();
ob_end_clean();
return $output;
}
Posted on 28/02/2010 um 8:06 PM.
nice plugin..going to try this…hope it won’t consume much of my 32mb WP memory
Posted on 04/03/2010 um 5:51 AM.
Hi, great plugin but I also get the weather box always appearing at the top of the content area, even if it is the last element in the post.
Thanks.
Posted on 07/03/2010 um 7:49 PM.
Hi, I love this plugin. I works fine while searching common Cities, but i will travel to “Beersheba, Israel” and the plugin doesn’t show the current day correct. The forecast havn’t this problem… Did you maybe have an idea?
Thx and kind regards
Ronny
Posted on 10/03/2010 um 3:16 PM.
I would love to see av predefined CSS that made it possible to define the with.
Posted on 17/03/2010 um 1:10 AM.
Hi,
This widget worked great for me until I upgraded Wordpress to 2.9.2. I look forward to using it again when you make it compatible with the new Wordpress update. Thanks!
Posted on 29/03/2010 um 12:30 AM.
It’s indeed a great plugin, shame it does not support portuguese language, neither pt nor br codes seem to work, how could I possibly get this amazing tool to work in Portuguese? I’m more than able to help translate the plugin to run on portuguese language. Any help on how I can get access to the archives that have the core words which must be translated? Thanks in advance!
Posted on 31/03/2010 um 3:41 PM.
Hi Hendrik, Thank you very much for your great contributions on this useful plugin. I hope you will make an update for this small tool in short future.
And I bet it will be even popular than now.
Features I wish to have:
×Color shows Half transparent. not the solid color now, will be more confort, like those colors used in iphone ect.
*the dimension will be adjustable to fit for different side bar width(Give a scope to adjust or give a min. and max to follow.)(My side bar width is 250px and there’s big blank left, I don’t know how to adjust in the codes.)
That’s what I really want to have now for this weather tool.
Still grateful for your good work.
Wish you more successful and made out more plugin tools.
Big hug!
Rocky W
Posted on 04/04/2010 um 6:26 PM.
thank you Hedrik! just successfully added my first wp plugin. i LOVE wp.google.weather. however, it disrupts the look of my home page unless i place it as the very last (lowest) sidebar item. i would like it to be my second sidebar item (after my seach box but before my ‘categories’) you know, to add some color near the top of my homepage. but, when i place it there, my remaining sidebar items (pages, links, archives) get shoved way, way down to the bottom of the page. it is as though the weather box is using many, many inches of white space below it. otherwise, it works perfectly. is there a simple fix? i’m a total newbie to wp. i use wp 2.92 and downloaded your plugin v 0.4.
Posted on 18/04/2010 um 7:31 PM.
hedrik, i meant to say i’m using wp’s default version. you can look at my site at http://www.lewiscountysirens.com thank you for creating a simple to use plugin!
Posted on 18/04/2010 um 7:34 PM.
Hi
your plugin is great and working well as long as it en but when i change the Lang to he (Hebrew) i see gibberish.
for some reason the char set is not utf-8 but getting some other char set
can you help me with it?
best regards
Avner
Posted on 19/04/2010 um 10:52 AM.
hey hedrik, i got it fixed with help on wp support forum. thanks again for an awesome plugin. –s
Posted on 29/04/2010 um 11:16 PM.
awesome plugin thank you thank you! i needed one without any sort of link and this worked flawlessly on wordpress 2.9.2
thanks again! (you should have a donate button)
Posted on 19/05/2010 um 1:32 PM.
The plugin works really great untill today, i looked at my blog and its all over this error from the widget:
Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 9: parser error : AttValue: ” or ‘ expected in /homepages/11/d156005184/htdocs/blog/wp-content/plugins/wp-google-weather/wp-google-weather.php on line 154
Any idea how to solve this?
Posted on 16/06/2010 um 3:08 PM.
Hi,
Very useful plug in, much appreciated.
I keep getting asked why the dates are ‘wrong’ on the 3 day forecast :{
Is there any way I could add the text “Min/Max Temps” below the graphics?
Thanks.
Posted on 23/06/2010 um 4:08 PM.
Hendrik, a very quick bug fix if you can… I am missing the icon for todays weather on this widget, I have logged onto the wp fourms to no avail, all the forecast icons are there, just not todays – any ideas?
http://www.st-bo.co.uk/?page_id=52
Bottom of the sidebar
Many thanks
Simon
Posted on 29/06/2010 um 7:11 PM.
Hi, great plugin!
But what does the numbers on the 3-day forecast stands for?
25/15 I know that the first stands for celsius degrees, but the other one(15)?
Regards,
Posted on 05/07/2010 um 8:21 AM.
Hi Hendrik,
Wondering if you or anyone else could help me.
I love your weather widget… i’m just trying to add a little code to make it centre on my sidebar instead of justifying left.
Do you have any ideas on how i can do this?
Posted on 07/07/2010 um 4:50 PM.
hello hendrik,
i’m sure i would love your plug-in, if there weren’t the fatal error
Fatal error: Call to undefined function: simplexml_load_string() in /www/…/wp-content/plugins/wp-google-weather/wp-google-weather.php on line 154
can you help me?
liebe grüße aus süddeutschland
)
Posted on 09/07/2010 um 12:33 AM.
hi, great plugin. i would love to use my own icons. is that possible? if yes, how?
thanks for your help
Posted on 14/07/2010 um 10:55 AM.
Hi there,
Is there php short code to insert this wp-google-weather plugin into my wordpress template (so not a widget or post or page. In my case I want to insert it into the header new to the logo.
I look forward to your reply
Posted on 20/07/2010 um 1:49 PM.
I am getting error on my front page:
Fatal error: Call to undefined function: simplexml_load_string() in /disk1/usr16/nuke/www/3percentofaton/wp-content/plugins/wp-google-weather/wp-google-weather.php on line 154
Can you help”
Thanks
Beth
Posted on 25/07/2010 um 1:19 AM.
Hello Hendrik,
This wp plugin is just great, how ever, just like a few others that have comented, is there a way I can have the plugin appear to be on the right side of my side bar instead of the defauly left?
I am using it for a site which is RTL, and it just looks out of line when its the only thing thats on the left side.
Please let me know.
Thanks a lot
Keep up the good work
Mani
Posted on 25/07/2010 um 7:46 AM.
Hi there.
I’m using your weather plugin. It did work for a long time, but now it shows an enormously big temperature (like 43 c, when it’s only 26) on my website.
Click on my website (in Norwegian, though) and have a look. Kinda crazy, but I like your plugin and don’t wanna remove it, you see.
Take care, man!
Posted on 29/07/2010 um 6:31 AM.