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 with a date, title, link and description as an unordered list.

There are seven optional attributes:

  • rssformat allows you to format the output using format parameters e.g. the default x: Y<br>z where x is the date, Y is the title with a link, y is the title, z is the description.
  • 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
  • rssdescription=’no’ allows you to suppress the description, default is to show it – this still works, but is deprecated: you should use rssformat instead

[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:

<?php
$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'] shows:

  • Fri, 03 Sep 2010 11:20:28 +0000: Deadly bomb hits Pakistan rally
    A bomb kills at least 22 people at a Shia Muslim-organised rally in Pakistan's south-western city of Quetta.
  • Fri, 03 Sep 2010 11:12:22 +0000: Autobiographies of the rich and famous
    Tony Blair's memoirs has become the fastest selling autobiography in Britain. But what are the biggest overall sellers?
  • Fri, 03 Sep 2010 11:10:13 +0000: Hirst works 'inspired by others'
    A group that campaigns against conceptual art claims 15 works by the artist Damien Hirst were inspired by other artists.
  • Fri, 03 Sep 2010 11:10:01 +0000: Man held over power drill attack
    A 19-year-old man is arrested after a serious assault in North Lanarkshire in which a man was attacked with a power drill.
  • Fri, 03 Sep 2010 10:59:14 +0000: 'Super-sized' mice study begins on remote island
    Researchers begin a study of the "super-sized" mice found on a tiny Scottish island in the Outer Hebrides.

while:

[rssinpage rssfeed='newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml' rssdescription='no' rssdateformat='j F Y' rsscss='rssclass'] shows:

If you find this plug in useful please consider donating to its future development:

  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • StumbleUpon

93 Comments

  1. InOzzie says:

    Hi, I am using your plugin in a widget. It is very simple and easy to use. I am having one small problem though. It is not updating with the latest entries. I have cleared the cache in my browser and I’m not using a caching plugin on the site so that shouldn’t be an issue. Not sure why the latest posts aren’t showing…..any ideas?
    Thank you

  2. shree says:

    i was looking for this plugin, thank you.. But i am observing, if i want to get a most recent 5 feeds, its coming in random order, not from the recent to old. If i give only one feed to fetch it will not give the recent one, its giving some old feed only.. please suggest me soon,

  3. Faraz says:

    Hi,

    This is a very nice plug-in,exactly same what i want.
    Thanks for such a great plug-in.
    I want to ask something.
    I want to show RSS news feed having following key words :
    teacher sexual misconduct, school sexual misconduct, teacher student sex, teacher student relationship, teacher student kiss, teacher student inappropriate
    How can i do that please help me about it.
    Because it is very urgent for me.
    Many many thanks in advance…

  4. I’m a newbee at this, but is there a way to have the RSS feed only pick up articles with keywords?

  5. thor says:

    Hi Titus

    Firstly, thanks for this plugin, it’s perfect for what I need. I’m having an issue with the feed not updating though – I noticed in one of your posts you said this should happen automatically with each page load..? I have no caching plugins activated that I’m aware of (this is the only activated plugin at the moment) but it simply refuses to update. If I view the feed xml, it contains many updates over the last 12 hours that aren’t showing up on my page.

    Do you have any suggestions with what the problem could be?

    Thanks

  6. titusbicknell says:

    To All: if you have an issue with a certain feed or installation of the plug in please include the feed URL and page link; without them it is impossible to help diagnose your issue.

    Re keywords: I have no plan to add a function to filter the RSS feed by keywords at this time, sorry.

  7. thor says:

    Hi Titus, I’ve changed the feed to use the same BBC news one as used in your example. The page that it’s on http://letstalkandroid.com on the sidebar under Latest Market Apps. I added the BBC feed about an hour ago and although it’s updated on the BBC site, it still hasn’t changed my feed result.

    I tested out using a standard SimplePie setup with caching enabled and the feed updated fine – I’d rather use your plugin though if possible.

    Thanks

  8. thor says:

    Sorry, I meant to say with caching DISABLED using SimplePie! :p

  9. titusbicknell says:

    I have just released version 2.2 with a revamped fetch feed function that forces the cache duration to 60 seconds and the link title state s users can see the full title when it is truncated. Let me know if this fixes your issues.

    Thanks for your continued support and patience!

    Titus

  10. Hans says:

    After install the 2.2 version i have some problems with the rss results.
    I get an error… “Warning: ./cache/fe9eb75889a6f990620602236e6aff48.spc is not writeable in /mnt/weba/31/07/52273907/htdocs/blog/wp-includes/class-simplepie.php on line 1779″
    Can you tell me what the problem is and how i can solved it.
    Kind regards Hans

  11. Hans says:

    Sorry.. i forgot the link..
    http://hansweb.eu/blog/voetbal/buitenland-3/engeland/
    This is an example… all page have the same error. Only the pages with rss…..

  12. thor says:

    The new version has indeed fixed the feed update issue I was having, thanks a lot for that! I’ll be sure to send a little donation your way.

  13. Corey Williams says:

    The RSS works but I keep getting this appove my RSS feeds:

    Warning: ./cache/9b00f63539e48ef796b67f3XXXXXXXXX.spc is not writeable in /hermes/bosweb/webXXX/bXXXX/ipw.XXXXXXXX/public_html/wordpress/wordpress/wp-includes/class-simplepie.php on line 1779

    How do I get rid of it?

  14. titusbicknell says:

    Hans, Corey and others: I am working on a release to correct the simplepie cache error and will have it out later today. my sincere apologies for any inconvenience caused.

  15. thor says:

    I forgot to mention that I had the same error – I just added a cache folder to the root though (as in, same level as wp-admin, wp-content etc) and it fixed the problem. Probably not suitable for everyone but it’ll fix the problem while waiting for an update.

  16. titusbicknell says:

    I have just released version 2.3 which sets the cache location, checks if the cache folder exists and makes it if necessary.

    Please upgrade and let me know if the release addresses your issues.

    Titus

  17. Greg says:

    Hi Titus,
    I just installed the latest but I’m getting this error:
    Fatal error: Call to undefined function: str_split() in /homepages/31/d283252910/htdocs/ready2connect/wp/wp-content/plugins/rss-in-page/RSSinpage.php on line 35

    I used this code from your example:
    [rssinpage rssfeed='newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml' rssdescription='no' rssdateformat='j F Y' rsscss='rssclass']

    Any ideas on what is going wrong?

  18. Corey Williams says:

    Thanks a million!!! How did you learn how to program? I need to start learning how to write PhP code.

  19. Hans says:

    Thanks you… problem is solved… Great job…

  20. titusbicknell says:

    Greg: str_split() is a php5 function so your error suggests you are on php4. Any way you can upgrade to php5?

  21. Greg says:

    Yep, that was it Titus. I’ll see if I can talk them into upgrading. The plugin looks good from the examples I’ve seen. I hope I can put it to use.

  22. titusbicknell says:

    Greg: good luck! At this point any WordPress hosting org should be offering php5 and it should really be the default setting.

  23. Jascha says:

    hey titus, can i please download version 2.1 somewhere because i changed the code a little and now i have a problem since i updated to version 2.3. :P

  24. Mike says:

    Great work here guys. Can anyone recommend an RSS feed script (or similar) that will show the full posts without leaving my website? I want to give this website http://www.myafricanworldcup.com a face-lift and have it on wordpress but have not found the relevant script or plugin yet.

    Thanks

  25. titusbicknell says:

    I am at WWDC2010 in San Francisco all week so apologies in advance for the delay in replying to your comments.

  26. burn says:

    Today I upgraded RSS in Page and since then I also get an error message: Warning: file_put_contents(): SAFE MODE Restriction in effect. The script whose uid/gid is 206023/206023 is not allowed to access … and so on.
    See http://solnabloggen.se/gymnastikhus-rasundaskolan/

  27. BradS says:

    Can I use the plugin in conjunction with the tag? The plugin is great for feeding a small RSS reader box on my home page but I only want to show an excerpt with a “read more” link back to my blog page.

    Is there a PHP symbol for rssformat that will either pull a manual excerpt with a link back or an wp automated excerpt using the more tag?

    http://www.promoventures.com

    Thanks.

  28. Coolkourt says:

    Hello, is there any way for the plugin to display rss feeds that arent html?

    rss-module.htm?tagName=News

    thats the end of my rss feed but it doesnt display the feed?

    Any idea

    thanks for the cool plug in

  29. Jessica says:

    Hi Titus, I’m trying to use your plugin in a sidebar widget because of the simplepie cache update (which looks like a really useful feature–thank you!). For my display, I just want the linked title with no date or description and I’m not sure how to get it to display that way when it’s not on a page–could you add an example of how to set optional attributes in the array, please? Thanks!

  30. Jessica says:

    Please ignore my previous comment; I figured out what I was doing wrong and it’s now working exactly as I need. Again, thanks so much–the cache was the problem with everything else I’d tried (everything went too long without updating the list) and this is now working perfectly.

  31. titusbicknell says:

    burn: the app needs a folder called cache in wp-content with 777 permissions to write to – if you create it manually the error should go away;
    BradS: rsstitlelength will give you the shortened links but directly to the RSS feed not somewhere else in your site – that I am afraid would be a whole different plugin :)
    Coolkourt: I need to see the whole RSS feed URL to help.

  32. Dave says:

    Nice plugin Titus.. works perfectly..

    thanks

    Dave

  33. Nisse says:

    If the possibility to filter the feed with certain keywords I would gladely pay for it!

  34. Steve says:

    Hi Titus, great plugin!

    Quick question though, I was just wondering how the input for: ‘rsscss’ => ”, works. I created an ‘rss.css’ but I’m not quite sure how to link it because I am a newbie!

    Thanks

  35. titusbicknell says:

    Nisse: it is doable but a big job I am afraid that I do not have time to take on at this time – sorry.
    Steve: the rsscss parameter is the name of a class in an already attached css file not a link to a new file – put your css class in the existing css file for your them and you can then call it from the shortcode.

  36. Owner says:

    Hi Titus,

    Excellent Plugin – exactly what I need to post recent comments to my blog.
    http://focusonedesign.ca/blog/contact/comments/

    I have it implemented, however is there a way to separate each comment with a tag? To separate each line?

    I own and operate a web design & development business and need your expertise a.s.a.p. Please get back to me, and thanks so much – love it!

    Also, how do you make the font a little larger?

  37. Owner says:

    Hi Again,

    Also, how to you post all comments? I have over 25 but only 10-15 are showing???

  38. WayneH says:

    I installed this plug-in but it doesn’t seem to be working:

    http://longviewbound.com/?page_id=37

    Code I used was:

    [rssinpage rssfeed='http://www.jobs.net/RSS/Texas-Longview.rss']

  39. titusbicknell says:

    Owner: please share the complete shortcode you are using so I can help debug.
    WayneH: the rssfeed URL gives me an error so the plug in has no data to work with.

  40. WayneH says:

    Titus, when I view the feed URL in Google Reader, I get a a list of jobs. Notsure why it’s giving you an error

  41. hi.
    how i can view full feed rss?
    i need to view full feed rss in a page to my site.
    plz help me.

  42. titusbicknell says:

    WayneH: unless the rss feed is readable in a web browser the plugin cannot process it sorry :(
    Morteza: please explain more and give the url of the feed you want to include?

  43. I live in iran and news site is filter by goverment.
    I need includ news rss in my wordpress news pages.

    http://feeds.feedburner.com/kaleme/rss/

    I need to display full page rss in my site because this rss link is filter.
    and help me for translate this blugin to persian.
    thanks.

Leave a Reply