Display custom field only if value present?
The easiest way would be to add a simple conditional: $values = get_post_custom_values(“listing_heading_10″); if ( $values ) { ?> <h3 class=”listing-title”><?php echo $values[0]; ?></h3> <?php } That said, is there any reason that you can’t put your output code in a foreach loop? e.g. $values = get_post_custom_values( ‘some_value’ ); foreach ( $values as $value ) … Read more