Displaying RSS Feeds On Wordpress Pages

Written by Joe on February 15, 2008 – 2:04 pm -

Wordpress LogoRecently I have been working on a large project, BlogSavy, a free blog hosting service. Other than the typical stuff like updating the software to the lastest version of WPMU and getting all the plugins and templates playing nicely with each other, recently there was a forum installed for support. As such, posting updates on both the host’s homepage and in the forum cumbersome, as well as a time waster.

The answer was using RSS from one or the other, and even though Wordpress already has RSS functionality I’d prefer using the blog’s homepage in a static manner and keeping all the info in the phpBB forum. So, a quick search found a quick and dirty simple RSS mod that required no template edits, and am going to use Wordpress’s built in RSS functionality to display this in a blog template.

Regardless of where you generate the RSS feed from, the code to display it will be the same. Since Wordpress already handles imported RSS to display info in the admin panel, we can just tap into that code using a php includes and then use those functions to our liking. So, on any template page (outside of the loop of course), you can throw in this code which can be downloaded in this text file.

Some things to note, you must include the file rss-functions.php before you can use the RSS functions. Change the $url = to your feed url. The variable $href will output the post’s url from the feed, $title would output the post title, and $description would output the post. You can change the number of items feed with $i == 5 to whatever you want it to be. Enjoy.


Posted in Web Development, Wordpress | 9 Comments »

9 Responses to “Displaying RSS Feeds On Wordpress Pages”

  1. PHP Tutorials Says:

    A fantastic read….very literate and informative. Many thanks….where is your RSS button ?

  2. Amelie Griffiths Says:

    Wordpress is the best blogging platform ever. It is much better than Typepad and blogspot.::.

  3. Keith H. Says:

    Is there a code snip to change the RSS url by using a selection box in the page the feed will appear? For example, list a few feeds from various sources, and when the selection is made, the RSS url gets updated, and that feed displays.

    Of course either a combo box, or short list of radio buttons might be used to select, with a link or button to refresh the page.

    Just wondering.

  4. Jasmine Turner Says:

    i host 5 of my blogs on Blogspot and it is really good for beginners. but if you want something with more features, nothing beats wordpress-.:

  5. Elizabeth Taylor Says:

    A very good marketing strategy is very important in promoting your products both online and offline.-,-

  6. Evan Nelson Says:

    RSS Feeds are really very helpful and you could get site and news updates from it.;*’

  7. Sebastian Hussain Says:

    marketing always makes a product more popular and is necessary for its success.*:`

  8. Adrian Morgan Says:

    RSS feeds are really great because you are always updated with the latest news or blog posts.,~,

  9. mariano Says:

    Nice one… did not know that….anyone has link to other similiar stuff ? thx Mariano

Leave a Reply