Problem with if/else custom field
-
The following code works if I add a value to the custom field but when I delete the value, instead of showing nothing, I’m left with ‘From £’.
<?php $values = get_post_custom_values("treatment_price"); if ( is_array($values) ) { echo '<h3><strong>From £' . $values[0]. '</strong></h3>'; } else { echo ''; } ?>
What’s wrong?
Thanks
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Problem with if/else custom field’ is closed to new replies.