CQ-CSER

计算机爱好者

How to: Display any rss feed on your WordPress blog【Z】

Posted on | 十一月 27, 2009 | 1 Comment

Here’s the simple code to add where you want the rss to be displayed (Personally, I’d use my sidebar, my footer or a page template):

<?php include_once(ABSPATH . WPINC . '/rss.php');
wp_rss('http://feeds.feedburner.com/wprecipes', 3); ?>

Let’s have a quick look to the code: First, we’re including the rss.php file, which is a part of WordPress core. This file allows us to use the wp_rss() function.
This function takes two parameters: The first is the rss feed url, and the second is the number of rss entries to be displayed.

If you enjoyed this article, please consider sharing it!
转自:http://www.wprecipes.com/how-to-display-any-rss-feed-on-your-wordpress-blog

相关文章:

  1. 啊~Asaph, Setting up your own FFFFound
  2. How to: Create and use WordPress page templates
  3. 7 Must Have WordPress Plugins For Every Blog
  4. 10 tips to make more money fromWP
  5. 优化你的 WordPress 之精简 HTML 代码(进阶篇)

评论|Comments

One Response to “How to: Display any rss feed on your WordPress blog【Z】”

  1. cq
    十一月 27th, 2009 @ 08:51

    http://warptencq.cn/asaph/feed
    < ?php include_once(ABSPATH . WPINC . '/rss.php');
    wp_rss('http://warptencq.cn/asaph/feed', 3); ?>

留言|Leave a Reply





  • Archives

  • SUNSHINE

  • About

    本博客采用创作共用版权协议,要求署名、非商业用途和保持一致. 转载本博客内容也遵循“署名-非商业用途-保持一致”的创作共用协议.

    订阅

    Search

    Admin