A WordPress Plugin for Handling RSS

The latest version of WordPress (2.5.1, at post time) has a nice plug-in management system built in to the administrator control panel. Per instructions found here, I installed a ‘core’ plug-in first and then the actual plug-in.

I was able to find PHP code for inserting a news feed (via SimplePie RSS) into WordPress. I placed this code into the sidebar of my theme:

<?php
// Call the function

echo SimplePieWP(
// Pass in an array of feeds as the first parameter

array(

http://graphics8.nytimes.com/services/xml/rss/nyt/Politics.xml&#8217;,

http://feeds.wired.com/wired/politics&#8217;,

http://www.washingtonpost.com/wp-dyn/rss/politics/index.xml&#8217;

),
// Pass in an associative array of configuration options as the second parameter

array(

‘items’ => 5

)
// End the function call

);
?>

To refine the output of the displayed news feed, edit the existing ‘default.tmpl’ file contained within a subdirectory of wp-content/plugins.

Advertisements

Tags:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s


%d bloggers like this: