2 Methods - How to Post RSS Feed on your Wordpress Blog
Recently I was working on a project to create a mashup website and for the first time faced the need to post RSS feeds from other websites on one place. Firstly I thought I would do the coding myself but after some research I knew that Wordpress in itself includes some functions (wp_rss() & fetch_rss()) which make your task easier

wp_rss() Vs fetch_rss()
| wp_rss() | fetch_rss() |
| Using this function is easier | It is also easy but takes few more lines |
| It increases the load-time of your website because it downloads the whole post | It doesnot increase because it downloads only the post links not the whole contents from the websites |
| Almost no customization can be done with this function | Much customization can be done with this function |
How to use wp_rss()
<?php include_once(ABSPATH . WPINC . '/rss.php'); wp_rss('http://feeds2.feedburner.com/PankajSpeaks', 5); ?>
where 1st parameter is the feed of the website you want to post the feed from while the 2nd parameter tells how many post links to be shown.
You just have to put this code in appropriate php file of your theme so that it is visible as post links from your other website or somebody else’s website for example if I want the feed to appear in my sidebar I will put it in my sidebar.php.
When you use wp_rss() for posting the feeds & hover the posted post links on your blog a big dialogue box is popped containing the content behind that link which doesnot look nice so to prevent this you can use fetch_rss().


Leave your response!