echo has_excerpt($att); //Results in True
echo $att->post_excerpt; // results in empty.
echo $att; // results "782" which is the ID of the attached image.
如果我使用
get_post_meta( $att , \'_wp_attachment_image_alt\', true)
我获得了备用文本,但似乎无法通过
$att->post_excerpt;
.