我正在尝试使用getEntityRecords获取特定的post featured\\u媒体。但我不能。
select("core").getEntityRecords("root", "media", { post: 92 })
我正在尝试使用getEntityRecords获取特定的post featured\\u媒体。但我不能。
select("core").getEntityRecords("root", "media", { post: 92 })
我找到了解决方案。。。必须使用getEntityRecord
不getEntityRecods
:
select("core").getEntityRecord("postType", "attachment", post.featured_media);