admin管理员组文章数量:1417555
wp_get_attachment_metadata( get_post_thumbnail_id( get_the_ID() ) )['image_meta']['credit']
returns nothing although there IS information in the attachment's credit field.
Is wp_get_attachment_metadata
for that EXIF data stuff or is it for the fields in the media manager?
Am I stupid?
wp_get_attachment_metadata( get_post_thumbnail_id( get_the_ID() ) )['image_meta']['credit']
returns nothing although there IS information in the attachment's credit field.
Is wp_get_attachment_metadata
for that EXIF data stuff or is it for the fields in the media manager?
Am I stupid?
Share Improve this question asked Jan 19, 2016 at 20:20 corysimmonscorysimmons 2111 gold badge2 silver badges6 bronze badges1 Answer
Reset to default 0It is for EXIF data.
But if that's the code you're using, it looks like you are trying to access array elements on a function call.
Try
$my_data = wp_get_attachment_metadata( get_post_thumbnail_id( get_the_ID() ) );
echo $my_data['image_meta']['credit'];
本文标签: post thumbnailswpgetattachmentmetadata()39imagemeta39 fetch WP metadata or EXIF
版权声明:本文标题:post thumbnails - wp_get_attachment_metadata()['image_meta'] fetch WP metadata or EXIF? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745257189a2650172.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论