Forums
Home / Plugins / How to hide get_post_meta if there is no content there?
(@dynamitharry)
14 years ago
Hi!
i’m working at a theme, and i got some problems..
my code problem:
<div id="middle"> <?php $description = get_post_meta($post->ID, 'right', true); ?> <?php echo $description ?> </div>
Is there anyway to hide the whole div “middle” if there is no content posted in the custom field ‘right’?
Was a bit too fast!
Found the solution here: