WP特色图像URI而不是自定义字段


WP Featured Image URI instead of Custom Field

我在一个主题的情况下,我不能依靠wordpress中的自定义字段,需要使用"特色图像"功能代替。

这是调用自定义字段 的代码
<?php $thumbnail_image = get_post_meta($post->ID, 'post-image', true); ?>

我在Wordpress codex中找不到任何关于"特色图像"的文档,但是在这个例子中是否可以调用页面特色图像的url ?

这应该会让你开始http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail

编辑:

$image_attributes = wp_get_attachment_image_src( get_post_thumbnail_id() );
$image_src = $image_attributes[0];