0
function the_post_thumbnail_caption() {
global $post;
$thumbnail_id = get_post_thumbnail_id($post->ID);
$thumbnail_image = get_posts(array('p' => $thumbnail_id, 'post_type' => 'attachment'));
if ($thumbnail_image && isset($thumbnail_image[0])) {
echo '<p>'.$thumbnail_image[0]->post_content.'</p>';
}
}
我已经看到了这个代码在网络中。但它只显示已附加的第一个图像描述。我是wordpress新手,仍然遇到编码问题。我怎么能把它放在一个循环中,以显示所有附加的图像描述。谢谢!WordPress的 - 循环图像说明