The listings on my site have three states: - Active - Sold - Expired
I wrote this to get listings that are in Active or Sold to automatically expire if they pass a certain date.
<span class="detail">Status: <?php
if(strtotime($property['data']['field_3211']) < time()){ echo 'Expired'; }
else if($property['raw']['field_3022'] == 5) echo 'Active';
else if($property['raw']['field_3022'] == 8 ) echo 'Sold';
else echo 'Not set';
?>
</span>
I now want to change it to only expire if the status is set to active and ignore the expiry if it is set to sold.