• Resolved karro

    (@karron)


    Hi! In the daily forecast, I would like to show today’s max and min temp (like the example on Marbella tennis weather). How do I do that?

    This is how it looks now:

    
    if ( is_numeric( ${'day_temp_high_' . $unit_c_f} ) ) {
    						
      if ( ${'day_temp_high_' . $unit_c_f} != '-99' ) { 
    	$return .= ${'day_temp_high_' . $unit_c_f} . "/";
      }
      else {
            $return .= "min ";
      }						
    }

    I would like something like this:

    if ( is_numeric( ${'day_temp_high_' . $unit_c_f} ) ) {
    	$return .= ${'day_temp_high_' . $unit_c_f} . "/";
    }

    But for some reason today’s max temp is -99…

    • This topic was modified 7 years ago by karro.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Weather Atlas

    (@weatheratlas)

    Hello Karro,

    Thank you for using our widget.

    1. “-99” explanation:
    In the morning widget presents today’s forecasted Hi and Low temperature.
    Later in the day (when max temp. has been reached and temp. is declining), the widget displays only forecasted Low temp.
    In reality -99 is impossible temp., and it’s just simple way of declaring in our data that there’s no more Hi temp forecasted for today.

    There’s no need to change the code.

    If there’s Hi temp. for the day – both Hi and Low will be displayed.
    If there’s no more Hi temp. for the day – only Low temp will be displayed.

    2. Marbella tennis weather is shortcode displayed within a text.
    Please read https://www.ads-software.com/plugins/weather-atlas/#faq
    How to place weather widget in the article?
    or
    How to place weather widget in the sidebar?

    Please let us know if you have any more questions.

    Thread Starter karro

    (@karron)

    Aha okay I see. But what if I in the evening/later (when max temp. has been reached and temp. is declining) would like to display what the max temperature was today? How can I do that?

    Plugin Author Weather Atlas

    (@weatheratlas)

    Unfortunately – there is no way.

    I understand your POV, but what has been – “has been”.

    The widget displays only current conditions, hourly and long-term forecast, there is no archive even for today’s Hi temp. or past hours.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Today’s max temp’ is closed to new replies.