具体代码
获取图片标题
- get_the_title(get_post_thumbnail_id($post->ID))
获取图片的代替文本
- get_post_meta(get_post_thumbnail_id($post->ID), '_wp_attachment_image_alt', true )
获取图片描述
- get_the_content(get_post_thumbnail_id($post->ID))
获取图片说明
- get_the_excerpt(get_post_thumbnail_id($post->ID))
评论 (0)