I have a restaurant menu theme and there are some menu items the owner has, with no pricing (all menu items have the option for a price and an alternate price)
In the taxonomy-menutype.php file [ shows the menu items ] there is this:
<div class="pricebox">
<?php if ( get_post_meta($post->ID,'atp_price',TRUE) ) {
echo'<span class="price">'.get_post_meta($post->ID,'atp_price',TRUE).'</span>';
} ?>
<?php
$moreprices = get_post_meta(get_the_id(),'atp_moreprice',true);
if( is_array( $moreprices ) ){ ?>
<?php foreach( $moreprices as $itemprice ) {?>
<span class="price"><?php echo $itemprice; ?></span>
<?php } ?>
<?php } ?>
</div>
What I need to do is hide the (either) field if there is no input (empty) otherwise if there is, then show the field...