WP 技巧: WordPress 的 RSS feed

可能你知道 WordPress 向你提供的那几个关于 Feed 调用的方法, 并知道如何在主题中插放你的 RSS 或者 Atom. 但你应该知道更多, 因为这些 Feed 可以向你提供很多的便利.

如果你知道 WordPress 的订阅链接规则, 那么就算人家不向你提供订阅链接, 你也可以订阅他的博客内容. 并可以通过它们订阅一些你感兴趣的内容. 你可以通过分类订阅, 通过标签订阅, 甚至对搜索结果进行订阅.

WordPress 的路径不是唯一的, 对 SEO 很不好, 但是很方便. :)
下面将以默认模式和 http://%siteurl%/%postname%/ 模式为例进行说明.

分类

默认模式
分类网址: http://www.example.com/?cat=7
订阅网址: http://www.example.com/?cat=7&feed=rss2
postname 模式
分类网址: http://www.example.com/category/wordpress/
订阅网址: http://www.example.com/category/wordpress/feed/

标签

默认模式
标签网址: http://www.example.com/?tag=wordpress
订阅网址: http://www.example.com/?tag=wordpress&feed=rss2
postname 模式
标签网址: http://www.example.com/tag/wordpress/
订阅网址: http://www.example.com/tag/wordpress/feed/

搜索

搜索网址: http://www.example.com/?s=wordpress
订阅网址: http://www.example.com/?s=wordpress&feed=rss2

由以上规则可以看出, 其实就是在访问的对象网址上加上 &feed=rss2 或者 /feed/ 以获取结果, 这种处理对于 archive.phpsearch.php 里面可以处理的存档应该都是可用的.

如果你关注某个博客, 但你未必会喜欢他所有的文章, 此时你可以通过标签或者搜索 RSS 来订阅部分文章. 例如: 你对 NeoEase 中关于 iNove 的文章感兴趣, 你就可以订阅下面的 RSS.
http://www.neoease.com/?s=inove

另外, 你还可以通过以下方法订阅留言内容. 如果你是站长, 可以通过它们来了解你的访客留言动态.
默认模式: http://www.example.com/?feed=comments-rss2
postname 模式: http://www.example.com/comments/feed/

声明: 本文采用 BY-NC-SA 协议进行授权. 转载请注明转自: WP 技巧: WordPress 的 RSS feed
  1. 苏洋 | #1
    Jun 12th, 2009 at 00:15

    :idea: 先占位后观文...

  2. kerby | #2
    Jun 12th, 2009 at 00:26

    继续板凳围观学习

  3. 苏洋 | #3
    Jun 12th, 2009 at 00:34

    百度看来...example这个站多了好多反向链接...会不会判断这页有问题呢...

  4. 爱月 | #4
    Jun 12th, 2009 at 08:33

    第一次排名这么靠前
    开个party庆祝一下

  5. 我@soho | #5
    Jun 12th, 2009 at 08:36

    学习了,不过应该多数人都愿意被订阅。

  6. 拆組達人 | #6
    Jun 12th, 2009 at 09:02

    筆記~

  7. 忘记月亮 | #7
    Jun 12th, 2009 at 09:08

    好东西,学习了。

  8. 大哥 | #8
    Jun 12th, 2009 at 10:54

    mg12贤弟,大哥我又来了,想请教贤弟为何wp2.8版本的体积怎么那么大,莫非要开始堕落了,贤弟有何看法?

  9. 尐 7 | #9
    Jun 12th, 2009 at 10:57

    嗯,涨知识了。

  10. 基本没谱 | #10
    Jun 12th, 2009 at 11:29

    我的FDDE就是出问题了

  11. 基本没谱 | #11
    Jun 12th, 2009 at 11:30

    NeoEase 能不能帮我看下我的 feedsky 不更新的问题呢???谢了先

  12. Jutoy | #12
    Jun 12th, 2009 at 13:18

    嗯,算是长见识了~

  13. 菜虫 | #13
    Jun 12th, 2009 at 15:46

    支持

  14. zozoozo | #14
    Jun 12th, 2009 at 17:09

    博主。。请问http://www.neoease.com/wordpress-rss-feed/这样的结构怎么设置呢
    我的都xxx。cn、p?123什么的

  15. bolo | #15
    Jun 12th, 2009 at 17:25

    正准备在博客里提供这样的功能。这对话题比较杂的博客很有用。

  16. john_ar | #16
    Jun 12th, 2009 at 19:49

    Hey, developer. Can you add condition to Tags if they've not been written? I did it for you.

  17. john_ar | #17
    Jun 12th, 2009 at 19:50

    Ugh, here's the code:
    [code]
    [/code]

  18. john_ar | #18
    Jun 12th, 2009 at 19:50

    Damn, how can i send it?

  19. john_ar | #19
    Jun 12th, 2009 at 19:51

    And... i've told about your iNove theme

  20. grubylee | #20
    Jun 12th, 2009 at 20:17

    只能说mg12很有心,这个也总结出来了

  21. 8suo | #21
    Jun 12th, 2009 at 21:08

    强 Strong Stark Сильный Fort Vahva 強い 강한

  22. parksohbet | #22
    Jun 14th, 2009 at 23:55

    thaks....

  23. mg12 | #23
    Jun 15th, 2009 at 00:29

    这个... 我是为了扒人家东西才研究了一下, 哈哈~

  24. 阿文 | #24
    Jun 15th, 2009 at 11:00

    mg12你对中文wordpress的贡献很大啊,很多中文都用inove这个主题。你的文章也不错,深入浅出说的很好,支持一下。

  25. austin | #25
    Jun 25th, 2009 at 03:46

    支持

  26. 雪东博客 | #26
    Jun 25th, 2009 at 16:31

    xiexie

  27. 阿珞 | #27
    Jul 1st, 2009 at 13:05

    inove模板里的右侧RSS订阅按钮 怎么在后台修改呢?
    我在sidebar.php里 把http://改成http://aluo.net/wp-feed.php后
    还是不能正常使用RSS订阅
    请教Neoease啊~~

  28. mg12 | #28
    Jul 2nd, 2009 at 00:32

    @阿文
    过奖了.

    @阿珞
    Hi, 你是想改链接还是想改图标?
    如果是修改链接, 主题后台就可以修改, 在 'Current Theme Options' 页面.
    如果是修改图标, 你可以在 img 目录中找到一个命名为 feed.gif 的图片, 改掉就可以了.

  29. 阿珞 | #29
    Jul 2nd, 2009 at 07:43

    我在Current Theme Petions里选择了『当鼠标在订阅按钮上方, 显示推荐订阅器列表』这个选项.
    但是后台sidebar.php的代码需要修改么? :?:

  30. mg12 | #30
    Jul 2nd, 2009 at 07:51

    @阿珞
    我已经看到你博客上的 Readers 列表了, 代码不需要修改.

  31. 阿珞 | #31
    Jul 2nd, 2009 at 07:53

    @mg12
    但是点击列表里的google或者鲜果订阅,都是显示未发现feed

  32. mg12 | #32
    Jul 2nd, 2009 at 08:05

    @阿珞
    你的原生 Feed 有点问题, (http://aluo.net/feed/) 去访问你的文件夹了...

  33. 阿珞 | #33
    Jul 2nd, 2009 at 08:10

    @mg12
    这样的话需要怎么修改呢?

  34. LSvKing | #34
    Jul 31st, 2009 at 18:59

    哥,你那个右上角的那个个RSS弹出菜单怎么搞的?

  35. lingkun | #35
    Sep 11th, 2009 at 18:12

    @LSvKing
    同问....

  36. mg12 | #36
    Sep 15th, 2009 at 10:24
  37. 奔四大叔 | #37
    Sep 16th, 2009 at 17:12

    正四处找这个,学习了,谢谢mg12

  38. 曹建的博客 | #38
    Dec 18th, 2009 at 20:19

    好东西,终于找到了。

  39. 黑煞哥 | #39
    Jan 27th, 2010 at 12:46

    敢情请教,diggs旁边的投票功能是?? 什么插件还是?

  40. roger | #40
    Mar 13th, 2010 at 02:58

    请问我的rss feed提示源代码错误怎么回事???高手@

    http://blog.rengang.org/feed
    提示如下

    Internet Explorer 无法显示此源

    此源包含代码错误。
    返回到上一页。

    但是查看源代码 feed是有的 错误在哪儿?如何解决呢????

  41. roger | #41
    Mar 13th, 2010 at 03:00

    拜托 明天我再来这里等答案 或者通过我的qq赐教一下 感谢 66701145

  1. 银河星尘
    Jun 13th, 2009 at 00:53

Twitter Email feed
RSS feed