Simple Feed List

Simple Feed List is a WordPress plugin that displays a list of entries from a valid RSS feed.

Author:David Artiss (profile at wordpress.org)
WordPress version required:2.0.0
WordPress version tested:3.1.4
Plugin version:2.3.2
Added to WordPress repository:13-04-2009
Last updated:03-12-2010
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:90
Rated by:10
Plugin URI:http://www.artiss.co.uk/simple-feed-list
Total downloads:15 048
plugin download
Click to start download

This is a very useful way to display RSS feed data in a list format - news updates, site updates, software updates, etc. All you need is the URL of the RSS feed.

To display a feed on your WordPress site you will need to either insert a call to a PHP function, where appropriate, into your theme or use a shortcode. Use the latter for displaying a list in a post/page and the former for displaying a list in the sidebar or elsewhere on the site.

PHP Function

<?php simple_feed_list('listurl','paras'); ?>

Where..

listurl : This is the URL of your RSS feed

paras : This is an optional list of parameters, each seperated by an ampersand (&)

The paras are as follows...

limit : The number of items to display from 1 to 20 (default is 5)

desc : This indicates whether you wish to display the description on the line below. This should be "Yes" or "No" or a numeric length. If omitted, it will assume to be "No". If a number is specified this will be used as the maximum length of the description.

title : This indicates the length that you wish to restrict the feed title to (in characters). By default, this will be unlimited.

more : By default, "More..." will be displayed at the bottom of the list with a link to the list URL. If you specify "No" then this will be omitted.

nofollow : If set as "Yes", this adds a REL="NOFOLLOW" tag to the links.

target : Specify the target of any links (default is _BLANK)

cache : Modify the time that the feed is cached (specify in hours - default is 1)

The plugin will then display a list of entries from the RSS as an HTML list (i.e. with <li> and </li> around each entry).

An example would be...

<?php simple_feed_list('http://images.apple.com/trailers/home/rss/newtrailers.rss','limit=5'); ?>

This would display a list of the latest 5 movie trailers from the Apple site. Descriptions will not be shown.

<?php simple_feed_list('http://images.apple.com/trailers/home/rss/newtrailers.rss','limit=5&desc=200'); ?>

This would display a list of the latest 5 movie trailers from the Apple site. Descriptions will be shown, up to a maximum length of 200 characters.

The following is an example of how it could be used, with a function_exists check so that it doesn't cause problems if the plugin is not active...

<?php if (function_exists('simple_feed_list')) : ?>
<h2>Latest Apple Movie Trailers</h2>
<ul><?php simple_feed_list('http://images.apple.com/trailers/home/rss/newtrailers.rss','limit=5'); ?></ul>
<?php endif; ?>

If you specify a limit of just 1, then the <li> tags will not be used, allowing you to embed the result in a sentence. For example, you could use a feed of quotes and use this to just display the latest quote.

Shortcode

A shortcode of [feedlist] can be used with any of the following parameters (only the first is required) - listurl, limit, desc , more, target, nofollow and cache. The formats of these parameters are the same as those above.

Using the Apple trailers example from above, you would write...

[feedlist listurl="http://images.apple.com/trailers/home/rss/newtrailers.rss" limit=5]

The results are presented as an unordered list - unlike the PHP function, this includes the <ul> and </ul> tags surrounding it. The exception, like with the PHP function, is if you request only one feed item to be output - this is written out without any list tags.

For help with this plugin, or simply to comment or get in touch, please read the appropriate section in "Other Notes" for details. This plugin, and all support, is supplied for free, but donations are always welcome.