HIDE Custom Fields
-
i currently have two custom fields but they show up even when there is nothing in their value box to show. I would like to hide the custom fields that are empty…this is the code that im using now…hope some one can just help me with that.. thank you.
<?php if(is_single() ) { ?> <h6 class="meta-field">Source : <?php $text = get_post_meta( get_the_ID(), 'Mood', TRUE ); echo make_clickable( $text ); ?></h6> <h7 class="meta-field">Via : <?php $text = get_post_meta( get_the_ID(), 'Style', TRUE ); echo make_clickable( $text ); ?></h7> <?php } ?>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘HIDE Custom Fields’ is closed to new replies.