<?php if (get_post_meta($post->ID, 'Rental', true)) { ?>
<li style="padding:3px 10px; line-height: 18px; height:34px">
<strong><?php _e('Rental Potential / Actual', 'spanglishwebs') ?>:</strong>
<?php
$priceWithoutFormat = get_custom_field('Rental');
$priceWithFormat = number_format($priceWithoutFormat, 0, ',', '.');
echo $priceWithFormat; ?>€/Annual
</li>
<?php } else { ?>
<li>Rental Potential / Actual: N/A</li>
<?php } ?>
Try if it works, your code is really messy…
1
solved How can I make this code if and else?