In the main content area of a wordpress page I'm using a php include to add in some script.
In the include script I can display the custom field values using the_meta().
However I need to use the value from a specific custom field, so I tried this
get_post_meta(post->ID, 'myfield', true);
Unfortunately the post->ID can not be found.
How can get the value of a custom field from within a script added by a php include?