I'm trying to use 'if' 'else' to display a link button if I have a value in the 'TourURL' custom field, and if not, nothing will display but can't seem to get the if code to work:
<?php if(global $wp_query;
$postid = $wp_query->post->ID;
echo get_post_meta($postid, 'TourURL', true);
wp_reset_query();
): ?>
<P>Show Link</P>
<?php else : ?>
<P>No Link</P>
<?php endif; ?>
Thanks!