I'm using
<?php global $wp_query; $postid = $wp_query->post->ID; echo get_post_meta($postid, 'FIELD', true); ?>
to get custom fields in my sidebar. I put them all in a list like this:
<li><?php global $wp_query; $postid = $wp_query->post->ID; echo get_post_meta($postid, 'FIELD1', true); ?></li>
<li><?php global $wp_query; $postid = $wp_query->post->ID; echo get_post_meta($postid, 'FIELD2', true); ?></li>
<li><?php global $wp_query; $postid = $wp_query->post->ID; echo get_post_meta($postid, 'FIELD3', true); ?></li>
I'm wondering how I could set up an if statement to see if I have actually entered the field, and only show it if it isn't empty.