I'm using the code below to display an image if the swap_select custom field value is true. If it's no it displays nothing. However when posts are first created no custom field exists. So what would the conditional be to account for no custom field at all and in that case display noithing?
<?php
$swap_value = get_post_meta($post->ID, 'swap_select', true);
// check if the custom field has a value
if($swap_value!= 'no') {
echo '<img class="" src="thumbs/speechbubble_pink.png"/>';
}
else{
}
?>