我用过Advancedcustomfields
用于创建高级自定义字段的插件。
Now, want to get an Advanced Custom field value using post id.
我已经尝试了下面的方法并得到了解决方案。
Now,please let me know if any other way I will get same result?
<?php
$post->ID=\'15\';
$var_name= get_field(\'field_name\', $post->ID);
/* field name means which u gave custom field name*/
echo $var_name;
?>