dtqf81594 2018-12-12 07:19
浏览 78
已采纳

如何使用REST api从特定类别发布帖子

I am using rest API to get the post from a specific Category. but from this URL http://example.com/wp-json/wp/v2/categories/?slug=category_name I am only getting the category name, not the post.

and by using this link

Check this link

I am getting all the post but not getting the featured image in that post.

note: I am using the better-featured image

  • 写回答

2条回答 默认 最新

  • doubeiji2602 2018-12-12 08:19
    关注

    You have to use the category ID. Example: http://example.com/wp-json/wp/v2/posts?categories=3160

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?