WordPress Plugin: RSS in Page
This plugin allows you to include an RSS feed in your page or post using a shortcode.
will return the 5 most recent items in the feed with a date, title, link and description.
The plugin is at version 2.8 and supports multiple feed URLs separated by commas and the addition of the feed name:
[rssinpage rssfeed='feedURL1, feedURL2']
The plugin supports truncation of the feed title and description.
There are several optional attributes:
- rssformat allows you to format the output using format parameters e.g. the default x: Y – w<br>z where x is the date, Y is the title with a link, y is the title, z is the description and w is the feed name
- rssitems returns a different number of items
- rssorder returns the oldest rss items rather than the most recent
- rsstarget=’_blank’ opens links in a new window/tab, default is ‘_self’
- rssdateformat allows item date to be formatted using php date parameters, default is RFC 2822 formatted date
- rsscss allows you to set a css class to style the list rather than the default content list style in the theme
- rsstitlelength allows you to truncate the title to a certain character length, default returns the whole title
- rssdescriptionlength allows you to truncate the description to a certain character length, default returns the whole description
- rssdescription=’no’ allows you to suppress the description, default is to show it – this still works, but is deprecated: you should use rssformat instead
- rsstimezone allows you to set the timezone in which the feed datetime will be displayed, default is UTC; use values from the php list of supported timezones e.g. PST is America/Los_Angeles, MST is America/Denver, CST is America/Chicago, EST is America/New_York
Please review the php list of supported timezones here to find a city in your timezone.
[rssinpage rssfeed='feedURL' rssitems='15' rssorder='asc' rsstarget='_blank' rssdateformat='j F Y' rsscss='myclassname' rssformat='x: y - z']
You can embed the plugin into your theme using the following code snippet:
$atts = array(‘rssfeed’ => ‘feedURL’);
You can add any of the optional attributes to the array.
Download the plugin at http://wordpress.org/extend/plugins/rss-in-page
[rssinpage rssfeed='newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml'] shows:
- Wed, 19 Jun 2013 01:13:11 +0000: VIDEO: One-minute World News - BBC News - Home
Watch the latest news summary from BBC World News. International news updated 24 hours a day.
- Wed, 19 Jun 2013 00:50:29 +0000: US surveillance 'foiled 50 plots' - BBC News - Home
The head of the US electronic spying agency tells Congress surveillance programmes leaked to media helped thwart 50 attacks since 2001.
- Wed, 19 Jun 2013 00:46:17 +0000: Attack follows news of Afghan talks - BBC News - Home
Four US soldiers have been killed at Bagram airbase in Afghanistan, hours after the US announced direct talks with the Taliban.
- Wed, 19 Jun 2013 00:30:45 +0000: Jail reckless bankers, report urges - BBC News - Home
A report commissioned by the UK government calls for new measures, including criminal sanctions, to make bankers responsible for their own failings.
- Wed, 19 Jun 2013 00:23:19 +0000: Nigeria militants kill school pupils - BBC News - Home
Suspected Boko Haram militants in Nigeria kill at least nine school children, in what survivors suggest is a response to growing vigilante groups.
[rssinpage rssfeed='newsrss.bbc.co.uk/rss/sportonline_world_edition/front_page/rss.xml , shows:
newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml' rssitems='15' rssdescription='no' rssdateformat='j F Y H:i:s' rsstimezone='America/New_York' rsscss='rssclass' rsstarget='_blank']
- 18 June 2013 19:01:33: Camelot seeks Royal Ascot revenge - BBC Sport - Sport
- 18 June 2013 18:48:19: Froome 'relief' at Wiggins Tour loss - BBC Sport - Sport
- 18 June 2013 18:13:11: Hearts rejected late investment bid - BBC Sport - Sport
- 18 June 2013 18:03:30: Campbell-Brown given provisional ban - BBC Sport - Sport
- 18 June 2013 17:31:58: Irish take centre stage at emotional Ascot - BBC Sport - Sport
- 18 June 2013 17:29:25: Carroll passes West Ham medical - BBC Sport - Sport
- 18 June 2013 17:06:06: Scolari calls for calm from protestors - BBC Sport - Sport
- 18 June 2013 16:22:14: Venus Williams to miss Wimbledon - BBC Sport - Sport
- 18 June 2013 15:33:33: Bogdanovic & Baker lose in qualifiers - BBC Sport - Sport
- 18 June 2013 15:25:38: MotoGP grid set to increase in 2014 - BBC Sport - Sport
- 18 June 2013 14:53:29: Grabarz injury forces withdrawal - BBC Sport - Sport
- 18 June 2013 14:19:19: Italy U21 2-4 Spain U21 - BBC Sport - Sport
- 18 June 2013 14:12:09: Lee match-fixing hearing date set - BBC Sport - Sport
- 18 June 2013 14:07:37: VIDEO: Bale should move for career - Zico - BBC Sport - Sport
- 18 June 2013 13:26:20: Pearce to leave as England U21 coach - BBC Sport - Sport
Please note: RSS in Page is built on the excellent SimplePie framework. Before submitting a support comment please check your feed is valid at http://simplepie.org/demo – if it functions there and you are still experiencing an issue please ensure to add the feed in your support request.
If you find this plug in useful please consider donating to its future development: