admin管理员组文章数量:1277899
I am trying to get a specific post featured_media with getEntityRecords. but I couldn't.
select("core").getEntityRecords("root", "media", { post: 92 })
I am trying to get a specific post featured_media with getEntityRecords. but I couldn't.
select("core").getEntityRecords("root", "media", { post: 92 })
Share
Improve this question
asked Nov 1, 2021 at 21:57
shadishadi
1301 silver badge10 bronze badges
1 Answer
Reset to default 2I found the solution... must use getEntityRecord
not getEntityRecods
:
select("core").getEntityRecord("postType", "attachment", post.featured_media);
本文标签: block editorHow to get featuredmedia of a post with getEntityRecords
版权声明:本文标题:block editor - How to get featured_media of a post with getEntityRecords? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741240736a2363926.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论