Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter walduran

    (@walduran)

    an how can I show the weather now?

    walduran,

    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):

    <?php
         if(function_exists('goWeather')) {
    	goWeather();
         }
    ?>

    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

    https://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.

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

    10x

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Weather Forecast – WP Wunderground] How can I use it as a widget at the side bar – WP Wunde’ is closed to new replies.