WordPress Plugin: RSS in Page

This plugin allows you to include an RSS feed in your page or post using a shortcode.

[rssinpage rssfeed='feedURL']

will return the 5 most recent items in the feed in the format:

date: title with a link – source

You can override this format using the optional attributes listed below.

The plugin is at version 2.9.1 and supports thumbnails and a read more link for truncated descriptions, 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’);
echo rssinpage($atts);

You can add any of the optional attributes to the array.

Download the plugin at http://wordpress.org/extend/plugins/rss-in-page

For example:

[rssinpage rssfeed='newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml']


[rssinpage rssfeed=’newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml’]


[rssinpage rssfeed='newsrss.bbc.co.uk/rss/sportonline_world_edition/front_page/rss.xml' rssformat='x: Y
p z' rssdescriptionlength='50' rssdateformat='j F Y H:i:s' rsstimezone='America/New_York' rsscss='rssclass' rsstarget='_blank']


[rssinpage rssfeed=’newsrss.bbc.co.uk/rss/sportonline_world_edition/front_page/rss.xml’ rssformat=’x: Y
p z’ rssdescriptionlength=’50’ rssdateformat=’j F Y H:i:s’ rsstimezone=’America/New_York’ rsscss=’rssclass’ rsstarget=’_blank’]

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:

299 thoughts on “WordPress Plugin: RSS in Page

  1. titusbicknell Post author

    Jerry: what rss URL are you trying to display – please provide me the complete shortcode.

  2. Ford

    Great plugin. I would like to ask that how i can control amount description’s word. I don’t want show to many word at description…

    Many Thanks!!

  3. Knolly

    This plugin saved my bacon!! brilliant piece of work.

    I did find a minor issue though. I found the description from the last item is carried forward and applied to feed items that have nothing in the description. This only happened in our application because we’re using RSS to publish calendar items which sometimes only contain a title and no description.

    The solution was simple enough:

    //Knolly – there’s an issue in that $z retains the last description if none is present in the feed item. I’ll clear it here:
    line 70 $z = ”;
    //End Knolly add

    Many thanks

  4. titusbicknell Post author

    Ford: truncation of the description will be in the next release.
    Knolly: many thanks for your kind words and for catching this bug – it will be addressed in the next release.

  5. nomad

    Great plugin. Is it possible to limit the length of the rss description? It’s possible with simplepie, so I suppose it will be possible with your plugin as well?

  6. Tacheles

    I find the plugin great. But i have a problem with a feed to display.
    The plugin doesn’t display feeds in this constellation “http://news.piratenpartei.de/syndication.php?fid=207&limit=15”

    The constellation from the feed “http://news.piratenpartei.de/syndication.php?limit=15 ” display it right.
    Can you help?

  7. dfwtinker

    I can’t seem to get any of the google (news.google.com/news?pz=1&cf=all&ned=us&hl=en&output=rss), time (feeds2.feedburner.com/time/topstories.rss.xml) or the only feeds that seem to work are those that actually end with rss.xml like in the example …[rssinpage rssfeed=’newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml’]

    Any help you can provide in resolving this would be greatly apprecited.

    Also is there any provision for getting the thumbnail that goes with the article?

  8. dfwtinker

    I would like to add this spinning globe icon to the beginning of each post on page 2 (ktwhitaker.com\supply) instead of the little white dots. My original goal was to include the pictures that came with the individual rss feed. However I can live with this option if you can tell me how to make it work. THe location of the url i won’t to use is … ‘spinningglobe’ => ‘href=”http://ktwhitaker.com/support/wp-content/uploads/2011/01/rotating-earth.gif”‘,

  9. rosa

    this is truly useful. Before I set about looking at the code is there a simple code to show no date or time of the post- ? my posts are for upcoming events you see and i dont want people to get confused with the date the post was written. will donate as soon as i get paid. thanks Rosa

  10. titusbicknell Post author

    rosa: simply define rssformat without the x value and no date will display
    stevedfwtinker: you can define a css class using rsscss and style the feed in whatever way you choose
    wim: no way currently to edit the rss feed data that is returned but I shall look into it

  11. Jack

    I just updated to the latest version of this plugin, and it caused the links to be formatted weird. Is there a new way to use the shortcode now?

  12. Rick Smith

    Have installed – one of the better plugins out there.

    Question: If I placed the shortcode on a post where only the last RSS item is shown, would I need to create another post to grab the next item published in the RSS feed?

    Or will the post ‘refresh’ and become new when the RSS feed is updated? I want to use the shortcode on a post so I can choose a category for the post to belong in (‘News’). A page with the shortcode would have to be linked and wouldn’t show up in the category ‘News.’

    Thanks for any help you can provide.

  13. Jack

    Can you give an example of code to put in the theme? The short example given doesnt work for me.

    I dont know what this represents:

    echo rssinpage($atts);


  14. titusbicknell Post author

    Rick: the plug in is designed to refresh the feed so each time the page loads the rss data is current

  15. titusbicknell Post author

    Rosa: simply create an rssformat attribute with x in it e.g. rssformat=’Y – w’

  16. Chris

    Is there a way to add a class to the date? I would like to be able to style this differently than the rest of the text. If not, if you could point me to the place in the code that maybe I could add it that would be awesome 🙂

  17. Lloyd

    Hi, this is a great plugin. Works perfect. I just wanted to make “Continue reading” open in a new page. Is this possible? Thanks.

  18. titusbicknell Post author

    Chris: line 58
    Lloyd: I am not sure where you are seeing continue reading but it is not part of the plug in – can you provide me a link as an example?
    Martin: nope just insert the shortcode into a page or post – if nothing shows you may have an error with the feed which you can verify at http://simplepie.org/demo

  19. titusbicknell Post author

    Martin: reformat as [rssinpage rssfeed=’http://ttela.se/1.617479′] and it works fine.

  20. Paul

    Also Titus, in creating a page specifically to track another site’s comments, I found that it’s limited to 10 items, despite my increasing the number to 20. I noticed in the google reader that it lists about 80 comments with the same link. Odd.

    [rssinpage rssfeed=’http://lakingsinsider.com/comments/feed/’ rssitems=’20’ rssdescription=’yes’ rsstimezone=’America/Los_Angeles’ rssdateformat=’D, M j g:ia’ rsscss=’rssclass’ rsstarget=’_blank’ rssformat=’Yz’]

    Any idea how to get the shortcode to display more than 10 comments like google?

    Thank you. If it’s complicated but doable, please email me so we can talk compensation.

  21. Paul Evans

    HI Titus – great plug in – I’ve been waiting for one as good as this.

    I’m not the world’s greatest techie and I can’t work out what the code would look like if I wanted to ONLY show the date and the post title from my feed (and not the source of the feed – I’m using my google reader shared item feed and it gets a bit repetitive!


  22. Paulie

    Hi Titus – great plugin – I’ve been looking for something as good as this for a while – thanks for sharing it.

    I’ve tried using it to get my Google Reader Shared Items feed and it works fine, but I’m no great coder and I’d like to get a list that just has the title, date (but not time) and a short extract (say 200 characters with a ‘read the rest’ link at the end of it). I definitely DON’T want the source though….

  23. titusbicknell Post author

    Paul: the http://lakingsinsider.com/comments/feed/ feed is configured to only deliver 10 items so there is no way for my plugin to retrieve more data than that; if you have access to the developers of that site you might be able to get them to alter the way the feed is constructed to deliver more data;

    Paul: to show date and title only add rssformat=’x: Y’to your shortcode;

    Paulie: to show date title and extract add rssformat=’x: Y – z’ rssdescriptionlength=’200’to your shortcode – plug in does not offer a read the rest link in this version but the link built into the title will take you to the full item

  24. Paul

    Did you see this question? I sent it before my last one, but no answer…

    Very cool plugin. The shortcode is so close to doing what I want, but I can’t quite get there. Maybe you’ll be able to help. I simply want to list x number of feeds (say 3 to make it simple) and have exactly that number of feeds shown (1 entry for each site) AND have them sorted by most recent post.

    In this example, there are 3 feeds listed but 3rd site (frozenroyalty) won’t list because the last post is a few days old. The end result was 1 item from Jewels and 2 items from Insider.

    [rssinpage rssfeed=’http://lakingsinsider.com/feed, http://www.jewelsfromthecrown.com/rss, http://frozenroyalty.net/feed‘ rssitems=’3′ rssdescription=’no’ rsstimezone=’America/Los_Angeles’ rssdateformat=’D, M j g:ia’ rsscss=’rssclass’ rsstarget=’_blank’]

    Am I making sense? I’d imagine it’s easy to do, but I can’t figure it out.

  25. Fuji

    Hey man…

    Thanks for the great plugin, works like a charm. I have one question though.

    My readers can optionally submit RSS thru gravity forms, however when they dont submit a feed, i get :

    Warning: file_get_contents(http:) [function.file-get-contents]: failed to open stream: No such file or directory in /home1/domain/public_html/website/wp-includes/class-simplepie.php on line 7854

    Which is not so strange as the FeedURL is empty. would it be possible to to have a default value (perhaps an RSS feed without content) so i don’t get this message?

    Thanks in advance

  26. Ivar

    Hello there,

    I am trying to ad adsense to the imported rss posts. No matter what plugin I use, it doesn’t seem to work.

    Can you please tell me if this is possible. And if it is, then I would like to know how offcourse! 🙂

    Kind regards


  27. Chuck

    I am trying to use this with Apple’s iTunes rss feeds and keep getting a “missing offer id cookie” error when I click on the links that are rendered on my page. It appears to be truncating or something.

    Here is the code I am using for RSS in Page:

    [rssinpage rssfeed=’http://itunes.apple.com/us/rss/topalbums/limit=50/genre=22/xml?partnerId=30&LS_PARAM=http%3A%2F%2Fclick.linksynergy.com%2Ffs-bin%2Fstat%3Fid%3DrD8dmL9Sdws%26offerid%3D146261%26type%3D3%26subid%3D0%26tmpid%3D1826%26RD_PARM1%3D’ rssitems=’50’ rssorder=’asc’ rsstarget=’_blank’ rssdateformat=’j F Y’ rssformat=’x: y – z’]

    Here is the page itself: http://blog.christianmusicreport.com/playlists/

    Any ideas?

  28. titusbicknell Post author

    Chuck: the plug in is working but the link format is not supportable I am afraid.

  29. Kevin Baker

    Very useful plugin. I have loaded in a feed from a wp-ecommerce website to display products. Is it simple to add a custom field like price? For example: [rssinpage rssfeed=’http://www.hookpublications.com/index.php?rss=true&action=product_list&category_id=1′ rssitems=’15’] has XML called . Is it simple to add this tag?

  30. Michael Winn

    Excellent plugin my friend. I know you mentioned adding rss.css to “stevedfwtinker” but is there an easier way to just add the bullet points to separate each post? Am I missing something?

    I am using: [rssinpage rssfeed=’http://respartners.com/feed/’ rssdateformat= “M o” rssdescriptionlength= “90”]

  31. Vinny

    I am trying to use the following shortcode but it does not work the way I’ve seen it work initially. Based on this shortcode, I only get the first feed even if I know there are feeds for the others too. If I extend the number to 50 feeds, then I get the second one but the third one does not appear. I would like the feeds from all sources to arrange chronologically, which it used to do before but somehow misbehaves now. Any thoughts?

    [rssinpage rssfeed=’http://www.bcg.com/62.rss, http://rss.mckinseyquarterly.com/f/100003s2jja1l06emqg.rss, http://feeds.feedburner.com/DeloitteUSEmergingTechnologies‘ rssitems=’15’ rssdateformat=’j F Y’ rsstimezone=’America/New_York’ rsscss=’rssclass’ rsstarget=’_blank’ rssdescription=’no’]

  32. Angie

    Thank you for an excellent plugin.

    I am a PHP newbie so apologies for this question and for using
    the wrong PHP syntax.
    Is there any way to use a dynamic URL or to set part of the
    rssfeed URL via a function? Using something like:
    [rssinpage rssfeed=getURL()] or
    [rssinpage rssfeed=’http://www.siteussedinfeed.com/cat=’ . getCategory()]

    If not is there a workaround?


  33. titusbicknell Post author

    David: the plugin supports truncation of title and description per the attributes listed above but has no word count truncation.

  34. titusbicknell Post author

    Kevin: parsing the feed for an additional tag would require custom development – since it would be feed specific I would need to charge for the work – you are very welcome of course to modify the code yourself.

Leave a Reply