【问题标题】:Wordpress custom rss or json feedWordpress 自定义 rss 或 json 提要
【发布时间】: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&amp;feed=rss2,但它没有显示每个类别的 10 个帖子。

谢谢

【问题讨论】:

    标签: php json wordpress rss feed


    【解决方案1】:

    是的,你可以。试试这个tutorial

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-02-06
      • 2011-06-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-09
      • 2020-09-08
      相关资源
      最近更新 更多