Custom field outside the loop and inside an array
To get a custom field value outside of the loop you need to call global $wp_query to get your post id. global $wp_query; $postid = $wp_query->post->ID; $image = get_post_meta($postid, ‘Thumbnail’, true);