最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin1浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论