admin管理员组文章数量:1130349
I created a custom post type and am getting the posts using the REST API. The returned json looks like this...
categories: []
content: {raw: "Morbi mollis tellus ac sapien. Etiam ut purus matt…allis tellus, vitae iaculis lacus elit id tortor.",
rendered: "<p>Morbi mollis tellus ac sapien. Etiam ut purus m… tellus, vitae iaculis lacus elit id tortor.</p>",
protected: false, block_version: 0 }
date: "2018-12-20T17:57:44"
date_gmt: "2018-12-20T17:57:44"
featured_media: 189
generated_slug: "book-post-two"
...
Unlike normal posts, it is not returning featured_image_src. Just featured_media. Is it possible to make the features image source appear in json? How can I get it in js?
I created a custom post type and am getting the posts using the REST API. The returned json looks like this...
categories: []
content: {raw: "Morbi mollis tellus ac sapien. Etiam ut purus matt…allis tellus, vitae iaculis lacus elit id tortor.",
rendered: "<p>Morbi mollis tellus ac sapien. Etiam ut purus m… tellus, vitae iaculis lacus elit id tortor.</p>",
protected: false, block_version: 0 }
date: "2018-12-20T17:57:44"
date_gmt: "2018-12-20T17:57:44"
featured_media: 189
generated_slug: "book-post-two"
...
Unlike normal posts, it is not returning featured_image_src. Just featured_media. Is it possible to make the features image source appear in json? How can I get it in js?
本文标签: REST API get featured image source for custom post type
版权声明:本文标题:REST API get featured image source for custom post type 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749075157a2312187.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论