Support » Fixing WordPress » PHP code to display data in column instead of row

  • Resolved mcnaden

    (@mcnaden)


    Hello, I am attempting to hack a template from the Awesome Weather widget to display the 5 day forecast in a column instead of a row. Current code follows, and this is a link to how that code is rendered.

    http://dev.bearleaderchronicle.com/site/sample-code/

    I have no coding experience so any advice is much appreciated. Thanks!

    <div id="awesome-weather-<?php echo $weather->city_slug; ?>" class="<?php echo $background_classes ?>" <?php echo $inline_style; ?>>
    
    	<?php if($weather->forecast_days != "hide") { ?>
    
    		<div class="awesome-weather-forecast awe_days_<?php echo $weather->forecast_days ?> awecf">
    
    			<?php foreach( $weather_forecast as $forecast ) { ?>
    
    				<div class="awesome-weather-forecast-day">
    					<div class="awesome-weather-forecast-day-temp"><?php echo $forecast->temp; ?><sup><?php echo $weather->units_display; ?></sup><?php if($weather->show_icons) { ?><i class="<?php echo $forecast->icon; ?>"></i><?php } ?></sup></div>
    				</div>
    
    			<?php } ?>
    
    		</div><!-- /.awesome-weather-forecast -->
    
    	<?php } ?>
    
    	<?php if( $weather->extended_url ) { ?>
    		<div class="awesome-weather-more-weather-link"><a href="<?php echo $weather->extended_url; ?>" target="_blank"><?php echo $weather->extended_text; ?></a></div>
    	<?php } ?>
    
    <?php if($weather->background_image) { ?>
    	</div><!-- /.awesome-weather-cover -->
    	</div><!-- /.awesome-weather-darken -->
    <?php } ?>
    
    </div><!-- /.awesome-weather-wrap: wide -->
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘PHP code to display data in column instead of row’ is closed to new replies.