Display RSS Feed From Any Blog on Your WordPress Blog

by Hiroshi on November 25, 2008

in Hacks, WordPress

Ever wanted to display any rss feed from any other blog on your WordPress blog? WordPress have a function, called wp_rss(), which is a built-in rss reader.

Add the following code where you want the rss to be displayed at your blog i.e. sidebar or footer:

<?php include_once(ABSPATH . WPINC . '/rss.php');
wp_rss('https://feeds.feedburner.com/phpmagicbook', 7); 
?>

We just included the rss.php file, which is a part of WordPress core.
This file allows us to use the wp_rss() function.

wp_rss() function takes two parameters:
The first is the rss feed url
The second is the number of rss entries to be displayed

How simple is that!

Related Posts

Previous post:

Next post: