Getting the values of custom post fields

It is possible to get the custom post field value?

YES. You need to use get_post_meta function.

If “in the WordPress Loop” use this code

$result = get_post_meta($post->ID, 'customField', true); 

Thanks If outside the Loop:

global $wp_query;

$postid = $wp_query->post->ID;

echo get_post_meta($postid, 'customField', true);

Thanks.

tags: & category: -