gpt4 book ai didi

json - 插件 WordPress JSON API - 如何获取具有偏移量的类别的帖子?

转载 作者:行者123 更新时间:2023-12-04 22:52:47 32 4
gpt4 key购买 nike

例如,在我的博客的“新闻”类别中有 50 篇文章。为了获得最后 10 个帖子,我这样做: http://mywordpress.com/?json=get_category_posts&slug=news&count=10&status=publish它工作正常。现在我想让我的帖子从 11 到 20 跳过最后 10 个帖子,等等。我能怎么做?

最佳答案

帖子计数默认为您在 wordpress 后端设置的任何内容(设置 -> 阅读)。只需添加页面参数即可实现分页。因此,如果您想要 11-20 的帖子,您只需调用

http://mywordpress.com/?json=get_category_posts&slug=news&count=10&status=publish&page=2

您可以在此处找到更多信息:JSON API Plugin Page, Other Notes

关于json - 插件 WordPress JSON API - 如何获取具有偏移量的类别的帖子?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18559753/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com