我正在使用本教程中WP tuts的元框http://wp.tutsplus.com/tutorials/reusable-custom-meta-boxes-part-3-extra-fields/ 一切正常,但我不知道如何调用图像上传程序的值。在我的索引中。php我使用了此代码
<?php $image_upload = get_post_meta($post->ID, $field[\'custom_image\'], true);?>
<?php print_r($image_upload );?>
它打印了这个Array (
[_edit_last] => Array ( [0] => 1 )
[_edit_lock] => Array ( [0] => 1331586724:1 )
[_thumbnail_id] => Array ( [0] => 152 )
)
当我写这段代码时:<?php echo wp_get_attachment_image(152); ?>
它显示完全不同的图像。有人知道我做错了什么吗?