I'm having trouble finding the proper wording/code to use a custom field if it exists.
What I have is an href that I'd like to link to a custom field by the name of "source_url". But If that custom field doesn't exist, I'd like to link to the_permalink.
So, if <?php get_post_meta($post->ID, 'source_url', true); ?> exists, echo that link, elseif echo <?php the_title(); ?>, in layman's terms. :)