Weather Underground
[Plugin: Weather Forecast - WP Wunderground] How can I use it as a widget at the side bar - WP Wunde (5 posts)

  1. walduran
    Posted 4 years ago #

    WP Wunderground Weather Forecast - WP Wunderground How can I use it as a widget at the side bar


  2. walduran
    Posted 4 years ago #

    an how can I show the weather now?

  3. indianabenny
    Posted 4 years ago #


    It's not a widget, but if you can edit your theme files and you can edit the plugin file, you can add a function to allow you to add it to your theme manually. First add the following code to the bottom of the wunderground.php file found in the wunderground plugin folder:

    function goWeather() {
    	$goWpUnderground = new wp_wunderground();
    	$goWeather = $goWpUnderground->build_forecast();
    	echo $goWeather;

    After you've done that, go to your theme file and place the following where you want the weather to show up (the sidebar.php file for example):

         if(function_exists('goWeather')) {
  4. Wish Web Geek
    Posted 3 years ago #

    I did this but I get this error showing up on my page:

    Warning: Missing argument 1 for wp_wunderground::build_forecast(), called in /home/vrflagst/public_html/wp-content/plugins/wunderground/wunderground.php on line 636 and defined in /home/vrflagst/public_html/wp-content/plugins/wunderground/wunderground.php on line 383

    http://vr.flagstaffit.com/guide-service/ - see sidebar

    It looks like it wants me to define build_forecast in the code you said to put into the wunderground.php file.

  5. aaviya
    Posted 3 years ago #

    Hi, I tried your solution, but it still doesn't show in sidebar. Can you help me to display weather as widget?


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Weather Underground
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic