[wp-hackers] get_post_meta in wp_head?

Mindshare Studios info at mindsharestudios.com
Thu Jan 8 01:55:58 GMT 2009


Is it possible to access post custom fields inside of plugin function
that hooks into wp_head?
Here's my code (however $post_ID isn't being returned):

global $post_ID;
$cstm = get_post_meta($post_ID, '_cstm', true);

if ($cstm != '') {
 // stuff
}

Thanks
Damian


More information about the wp-hackers mailing list