I have to put many options with custom type templates plugin for a kind of post. But for some products, maybe the client doesn´t has all options to put, How can I hide fields that is not used? I know that I have to use "if and else" but I dont know the correct way. Can anyone help me?
My code is:
<a href="<?php
$download = get_post_meta($post->ID, 'brochura-pdf', true);
echo wp_get_attachment_url($download);
?>" target="_blank">Brochura</a></br>
and
<?php $video = get_post_meta($post -> ID, 'video Youtube',true) ?>
<?php echo $video; ?>
Thanks a lot!