admin管理员组文章数量:1327524
I am attempting to remove/hide a post via the REST API and having issues.
Currently, I have tried sending the payload as:
{
'status':'private'
}
And I send the request to:
/wp/v2/posts/<id here>
Every other part of my requirements works. I am able to create a post and update post content, but now I want to remove a post without deleting it, but it doesn't seem like I can update the status. I remembered reading that the payload needs to include title, content, and excerpt, so I tried another request with those and that didn't work either.
I suppose I could fully delete the post if I need to, but this would work better for my needs. Does anyone know how to accomplish this or what I'm doing wrong?
本文标签: Updating post status via rest api
版权声明:本文标题:Updating post status via rest api 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742191571a2430312.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论