diff --git a/wp-includes/template-functions-post.php b/wp-includes/template-functions-post.php index d49f3831b4..7f5221d0ae 100644 --- a/wp-includes/template-functions-post.php +++ b/wp-includes/template-functions-post.php @@ -234,6 +234,8 @@ function get_post_custom_values($key='') { } function post_custom( $key = '' ) { + global $id, $post_meta_cache; + if ( 1 == count($post_meta_cache[$id][$key]) ) return $post_meta_cache[$id][$key][0]; else return $post_meta_cache[$id][$key]; }