admin管理员组文章数量:1425805
Is there a way to query previews made to updates of already published Posts via the WP API? For example, I am making updates to a post that has already been published, I click the preview button, and it takes me a url similar to
/?preview_id=219&preview_nonce=ff84df100b&preview=true&_thumbnail_id=245
Is there a way access that content via the API?
I am working on a headless WP project and need a way display the preview in our custom front end. I can display posts that are in Draft status, as well as posts that have been published, by hitting the API. It is this last case of published posts that have additional updates that I cannot seem to figure out.
Any help is appreciated, thanks!
Is there a way to query previews made to updates of already published Posts via the WP API? For example, I am making updates to a post that has already been published, I click the preview button, and it takes me a url similar to
http://example/my-post/?preview_id=219&preview_nonce=ff84df100b&preview=true&_thumbnail_id=245
Is there a way access that content via the API?
I am working on a headless WP project and need a way display the preview in our custom front end. I can display posts that are in Draft status, as well as posts that have been published, by hitting the API. It is this last case of published posts that have additional updates that I cannot seem to figure out.
Any help is appreciated, thanks!
Share Improve this question asked Jun 14, 2019 at 23:10 Anton EmeryAnton Emery 431 silver badge4 bronze badges1 Answer
Reset to default 1Figured it out. There is a revisions endpoint that you can query that will return the latest autosaved update.
https://developer.wordpress/rest-api/reference/post-revisions/
本文标签: Query Post Preview Updates from the WP API
版权声明:本文标题:Query Post Preview Updates from the WP API? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745393301a2656699.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论