Fetching private posts or custom post types via WP-API with basic authentication

I've installed WP-API along with Basic Auth. I'm able to fetch cpt posts usingcurl ={post-type}However, if I c

I've installed WP-API along with Basic Auth. I'm able to fetch cpt posts using

curl ={post-type}

However, if I change a post to private, it is no longer returned. This is true even when sending the author's user credentials with either an auth header or simply using

curl http://username:[email protected]/posts?type={post-type}

Is this by design? Am I missing something obvious?

EDIT: Just want to specify, I'm looking for a way to get an author's private posts returned in the JSON feed while providing their credentials using Basic Auth.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744917613a4600931.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信