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('http://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!

  • Share/Bookmark

,

2 Reviews

  1. Raza says:

    Really amazing. WordPress rocks.

Leave a Review