wordpress - PHP foreach loop to normal statements -
i doing website on wordpess , got problems foreach loop. got following code printing links on website
providing know each status , want print them in different order how can destroy foreach loop , write 1 after other. there 3 different statuses , instead of showing them everytime first last, want order them in different ways depending on page on. help? understand how foreach loops work cant manage it
<?php foreach ( $property_statuses $property_status ) { ?> <li><a <?php if($current == $property_status->name) { ?>class="current trianle"<?php } ?> href="<?php echo get_term_link($property_status); ?>?property_layout=<?php echo $property_layout; ?>&status=<?php echo $property_status->name; ?>&sort_by=<?php echo $sort_by; ?>"><?php echo $property_status->name; ?></a></li> <?php }
Comments
Post a Comment