【发布时间】:2014-09-02 13:09:42
【问题描述】:
是否可以让 wordpress 输出 rss 或 json 以及来自所有类别的最后 10 个帖子,并发布了 10 个或更多帖子?
类似或类似的东西:
<categorie>
<title>News</title>
<slug>news</slug>
<lastposts>
<item>
<title>New 1</title>
<url>http://website.com/new1</url>
<thumb>http://website.com/thumbnail_new1.jpg</thumb>
</item>
<item>
<title>New 2</title>
<url>http://website.com/new2</url>
<thumb>http://website.com/thumbnail_new2.jpg</thumb>
</item>
...
</lastposts>
</categorie>
<categorie>
<title>Other</title>
<slug>other</slug>
<lastposts>
<item>
<title>Other 1</title>
<url>http://website.com/other1</url>
<thumb>http://website.com/thumbnail_other1.jpg</thumb>
</item>
<item>
<title>Other 2</title>
<url>http://website.com/other2</url>
<thumb>http://website.com/thumbnail_other2.jpg</thumb>
</item>
...
</lastposts>
</categorie>
...
我已经尝试过使用http://www.example.com/?cat=42,43&feed=rss2,但它没有显示每个类别的 10 个帖子。
谢谢
【问题讨论】:
标签: php json wordpress rss feed