On our recent post, we have write about WordPress Feed Tricks, Right now we will do something else. Sometime we have another useful resource about our blog, some of them really interesting and we need to put the content on Sidebar. With little bit code and tweak, we can made it on our WordPress. How To Display External RSS Feeds on our WordPress is easy.
There are so many method to display External Feeds, we can using RSS Widget, or write our own code. On this tips, we use some WordPress functions and make it smoothly on our WordPress
The first time is open sidebar.php (if you want display external RSS content on your sidebar) and write this code below
<?php
require_once (ABSPATH . WPINC . '/rss-functions.php');
// here's where to insert the feed address
$rss = @fetch_rss('http://feeds2.feedburner.com/WPGPL');
if ( isset($rss->items) && 0 != count($rss->items) ) {
?>
<?php
// here's (5) where to set the number of headlines
$rss->items = array_slice($rss->items, 0, 30);
foreach ($rss->items as $item ) {
?>
<li> <a href='<?php echo wp_filter_kses($item['link']); ?>'> <?php echo wp_specialchars($item['title']); ?></a> <span class="sdate"><?php echo wp_specialchars($item['description']); ?></span> </li>
<?php } ?>
<?php } ?>
Please note, you need replace RSS feed source with your own resource and save than check on your own blogs. In our example, you can check on our sidebar, don’t forget to subscribe our post. If you have little bit knowledge on CSS and XHTML you can make it more fancy layout.



Hey, thanks for this. I was searching for this particular thing. I wanted to display news feeds on my blog. Thanks once again.
You are welcome Sharath
Thanks for the scripts. Now I don’t have to use widgets to display external rss feeds.
thanks for this nice tut but i need simple and php code that not use any external include file.
Does anybody know how to add a custom field to the section where the url is at. I want to be able to add diffrent urls to each single page through custom fields. Thanks
can you tell me how to add rss feed in to wordpress page?
wow, works perfectly. Thank you so much!
Wow! I was looking for this everywhere..
Thank for the code
I was successfully implementing this code but not with the rss feed with images. Any help?
I am interested in showing rss feeds with images too so I second Irwan in asking for help.
Nice post!
How to get latest post only(or set the number of posts we want to get)
Thank you!
Hi,
When I use your code in my blog’s sidebar, it gives me the following error.
======================================
Fatal error: Call to undefined function _deprecated_file() in /Users/admin/Sites/dealmagic/wordpress/wp-includes/rss-functions.php on line 8
======================================
I am using the following RSS feed
http://www.dealmagic.com/delhi.rss
Can you please point out what might be wrong.
Thanks
Can you Paste your Code on pastebin.com and share to us?
Thank you for the post. It very useful. I were looking for a solution since hours. Your solution is working for me
Good article .. its help me lots without plugins.. thanks a lots
Good article, although i cant get it to work right. This is what im looking for, to add my news rss feeds from another site, its perfect, if i knew how to do it