Displaying WordPress RSS Feeds on Another Web Site

by | Feb 16, 2011 | Professional | 0 comments

RSS Feed on Safe Computing Web SiteRecently, I had the task of trying to get a WordPress created RSS feed onto the home page of another web site. We have a Safe Computing web site that I maintain. On the home page, I list the recent Security Updates sent out by our security team via a mailing list. This is a manual process, easy yet time consuming.

The security team recently started a WordPress blog on our Blogs@UCI service and create posts for each of the security update messages that go out. Now it would be possible to use the WordPress created RSS feed to dynamically create this list. The only problem was I was not sure the best way to accomplish displaying this feed on my web page.

I did a Google search and found this great article on Corvid Works [link no longer valid ] on using SimplePie, a PHP script, to bring in the RSS feed. It worked flawlessly. I was even able to pull in two different feeds for the two categories used to create two separate lists, one for application updates and the other for operating system updates. The hardest part was finding the correct code for the feed.

  • For the Application Updates I used:
    http://sites.uci.edu/security/category/application-updates/
  • For the Operating System Updates I used:
    http://sites.uci.edu/security/category/operating-system-updates/

The path uses the Blog URL, followed by /category/ and then the category itself, replacing spaces with dashes. You can do the same using tags, by replacing /category/ with /tag/ and then the tag name.

Pretty neat, huh? Now, my Updates are generated by RSS feed and I don’t have to manually go in and change them.

TAGS » php | rss feed | wordpress

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *