[函数]

<?php get_post_custom_values($key, $post_id); ?>

【参数】
$key
(string) (必须) 你想要返回值得key.
Default: None
$post_id
(integer) (可选) 被查询的文章id.
Default: Current post

【示例】
默认用法
下面的例子将一个变数($mykey_values)设置为一个数组,包含关键字为my_key的当前文章的自定义fields的参数值。

<?php

  $mykey_values = get_post_custom_values('my_key');
  foreach ( $mykey_values as $key => $value ) {
    echo $key . " => " . $value . "<br />"; 
  }

?>
0 => First value with "my_key" as its key
1 => Second value with "my_key" as its key
2 => Third value with "my_key" as its key
etc...