I won’t even show my code as it would be embrassing no doubt, but I’d like to show ‘Sold’ if false and ‘Available’ if true. (if availability == true then ‘available’ else ‘sold’.)
Ah, ok, your field is within a structure, so $page does not make sense, of course, you would have to adapt that to fit your code, i.e. whatever variable you are using within your foreach loop.
BTW. Could you please use the question category for questions? Makes it easier to keep track. Thanks.