Last active
November 7, 2017 19:32
-
-
Save halgatewood/006b0bebaa797de78069500a26f16927 to your computer and use it in GitHub Desktop.
How to show the simple weather in a PHP template for Awesome Weather Widget PRO
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$where = new stdclass; | |
$where->location = "Dublin"; | |
$where->owm_city_id = 2964574; | |
$where->units = "F"; | |
$weather = get_awesome_weather_openweathermaps( $where ); | |
if( isset($weather->data['current'])) { ?> | |
<div class="awe-weather"> | |
<i class="<?php echo $weather->data['current']['icon']; ?>"></i> | |
<?php echo $weather->data['current']['temp']; ?>° <?php echo $weather->data['current']['description']; ?> | |
</div> | |
<?php } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment