plugins - Is it possible to custom set query for a WordPress REST API response?

I have a custom post type that I am querying for through WordPress REST API, right now the response returns all the post

I have a custom post type that I am querying for through WordPress REST API, right now the response returns all the posts. I would like to set the tax_query argument based on the user who is sending out the request. Is this possible? Or do I have to create a specifi endpoint for that?

I was thinking something like pre_get_posts filter, but I don't know how to do that for the REST API.

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

相关推荐

  • plugins - Is it possible to custom set query for a WordPress REST API response?

    I have a custom post type that I am querying for through WordPress REST API, right now the response returns all the post

    13小时前
    50

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

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

关注微信