I'm building a single template right now for a custom post type. I'm wondering if there is a way to check if either at least one or multiple of the custom values has been entered so I can display the div accordingly. Basically, I want to display the div it has anything filled out, if it is left blank then don't show it. Is this possible?
Here is a sample snippet I have:
<?php IF STAEMENT HERE ?>
<div id="downloads">
<ul>
<?php if(get_post_meta($post->ID, 'sermon_video', true)) { ?>
<li><a href=" <?php echo $post_meta_data['sermon_video'][0]; ?>">Video</a></li>
<?php } ?>
<?php if(get_post_meta($post->ID, 'sermon_audio', true)) { ?>
<li><a href=" <?php echo $post_meta_data['sermon_audio'][0]; ?>">Audio</a></li>
<?php } ?>
<?php if(get_post_meta($post->ID, 'sermon_document', true)) { ?>
<li><a href=" <?php echo $post_meta_data['sermon_document'][0]; ?>">PDF</a></li>
<?php } ?>
</ul>
</div>
<?php ENDIF ?>