I am doing a website on Wordpess and I got some problems with a foreach loop. I got the following code for printing some links on my website
Providing that i know each status and I want to print them in different order how can I destroy the foreach loop and just write one after the other. There are 3 different statuses and instead of showing them everytime from the first to the last, I want to order them in different ways depending on the page I am currently on. Any help? I understand how foreach loops work but I cant manage to do it
<?php foreach ( $property_statuses as $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 }