是否可以让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个帖子。
感谢
可以。试试这个教程。