I'm trying to the $appLink variable with a custom field value outside of the loop. I'm using Wurfl to detect the users device, I'd like to echo the custom field value for the URL. This is what I have but I can't get it to work. Can anyone help please?
else if ($os == 'iOS')
{
global $wp_query;
$postid = $wp_query->post->ID;
$appLink = echo get_post_meta($postid, 'ios_app_link_sb', true);
wp_reset_query();
}