aggr

aggr allows you to place the contents of an RSS feed into your pages or posts. It is a deeply modified version of the Aggregate plugin of Rob Miller (I also used an idea of Michael Jolley).

To install and use it, download the zip file (latest release: 1.1), extract aggr.php, upload this to your wp-content/plugins/ directory, activate the plugin in WordPress.

To use it, add one or more lines to your page or post like
<!--rss url="http://perassi.org/feed/"-->

If you need a widgetized version, try aggrw.

ChangeLog:

  • Version 1.1 (2007-12-10): it adds $item_count and $title_length with code closer to what suggested by Scott;
  • Version 1.0b (2007-09-03): it fixes a small typo;
  • Version 1.0 (2007-07-07): first release.

66 Comments

  1. Posted July 8, 2007 at 3:00 am | Permalink

    been looking for this! :) thanks will try out

  2. Posted July 8, 2007 at 5:31 pm | Permalink

    I cant get this to work in my sidebar. Is this allowed?

    Thanks!

  3. Posted July 8, 2007 at 5:45 pm | Permalink

    Hello Laundro.
    This plugin is designed to live inside a page or post, not in the sidebar (it is not a widget plugin) so the answer is no, it is not allowed.

  4. Posted July 8, 2007 at 11:22 pm | Permalink

    Hi. Plug in worked without a hitch. Thanks and nice job. I’m testing it within a ‘page’ currently. The Wordpress community appreciates your efforts.

  5. Posted July 9, 2007 at 8:33 am | Permalink

    very nice plug in for news related blogs thanks

  6. Posted July 9, 2007 at 8:37 am | Permalink

    @BigNerd, @latest:
    thank you all. :)

  7. Posted July 9, 2007 at 4:53 pm | Permalink

    I installed and activated the plugin, then created a new Page with the line as the only thing in the page.

    The error message I get is:

    Warning: array_slice(): The first argument should be an array in .../wp-content/plugins/aggr.php on line 34

    What do you suppose went wrong?

    Thanks,
    Thomas

  8. Posted July 9, 2007 at 5:07 pm | Permalink

    @Thomas:
    try without the “code” tag: just a simple comment like
    <!–rss url=”http://perassi.org/feed/”–>

  9. Posted July 9, 2007 at 5:17 pm | Permalink

    I just used the code tag in the comment on this page. I see that you have your example of a feed using an http address, but most of the feeds I’ve seen have a URL of feed://examplefeed.com, does that make a difference?

  10. Posted July 9, 2007 at 5:28 pm | Permalink

    @Thomas:
    feeds are over http:// try with http:// instead of feed://

  11. Posted July 9, 2007 at 5:35 pm | Permalink

    Some feeds work like that, but not all. I guess it depends on the way the feeder site sets it up.

    Thanks! This is the perfect plugin for what we’re trying to do.
    ~Thomas

  12. Posted July 9, 2007 at 5:41 pm | Permalink

    @Thomas:
    good… if you find it useful, consider putting a link to the plugin page somewhere.
    Thanks.

  13. Posted July 9, 2007 at 10:37 pm | Permalink

    Getting many line numbers with:
    Warning: Invalid argument supplied for foreach() in

    (then, the path and line number)

    Comment feeds seem to work. I have tried this with a couple of different feeds.

  14. Posted July 9, 2007 at 11:04 pm | Permalink

    @Shawn: I didn’t get that warnings of that kind… could you please give me (by email) the feeds that give you problems? Don’t forget to put the ending “/” when the feed name is like http://sitename/path/feed/

  15. Posted July 18, 2007 at 9:01 pm | Permalink

    As it turns out, it was another plugin that caused the errors. Here’s your plugin displaying output of shawnblog.com RSS to my main site, shawnhonnick.com

    http://www.shawnhonnick.com/shawnblog/

  16. Posted July 18, 2007 at 9:17 pm | Permalink

    @Shawn: good!

  17. Posted August 1, 2007 at 6:57 am | Permalink

    Can I control how many RSS entries are displayed? i.e., display all posts from the last 7 days?

  18. Posted August 1, 2007 at 8:50 am | Permalink

    @joe:
    changing line 34 from $items = array_slice($feed->items, 0); to $items = array_slice($feed->items, 0, 7); will let you see, for a given feed, its last 7 entries. This is not what you want but it is the only way to control the number of displayed items I know you can use, without changing extensively the way that the feeds are fetched/processed.

  19. Posted August 30, 2007 at 8:53 pm | Permalink

    I do have problems with german umlauts eg ä,ö,ü,ß. My Wordpress version is 2.2.1 and under reading options is UTF-8 activated. I made a testing section under “test” on my blog. There you can see theat german umlauts are not displayed, only “?”. Many thanks for your help and greetings from Austria, Manfred

  20. Posted August 31, 2007 at 8:52 am | Permalink

    Manfred:
    I think that your problem is outside your WordPress settings (Apache? PHP?) because on my test page
    http://perassi.org/p/test/ (no more available)
    you can see the same feed (the first one is another German feed I added because it also contains some umlauts) without problems.
    Greetings from Italy. :)

  21. Jon Bings
    Posted September 21, 2007 at 3:47 am | Permalink

    Hi Carlo,

    seems the feeds dont show up on my posts or pages.. i tried to use your example.but all i have is a black page except for the title..

    is there anything that ive missed?.

  22. Jon Bings
    Posted September 21, 2007 at 3:48 am | Permalink

    sorry it should be a blank white page with the title of the page only..

  23. Posted September 21, 2007 at 8:46 am | Permalink

    Jon: Ok, fine. :)

  24. Posted October 10, 2007 at 4:45 am | Permalink

    I took what Carlo said above, made the count a variable, and also added a variable to limit the amount of characters that are printed per title.

    so my get_rss function looks like this:

    function get_rss($url) {
        include_once (ABSPATH . WPINC . '/rss.php');
        define("MAGPIE_OUTPUT_ENCODING", "UTF-8");
    
        $item_count = 10;
        $title_length = 40;
        $feed = fetch_rss($url);
        $items = array_slice($feed->items, 0, $item_count);
        $channel = $feed->channel;
        $feed_contents = '';
    
        if (!empty($channel)) {
            $feed_contents .= '' . $channel['title'] . "\n";
        }
    
        if (!empty($items)) {
            $feed_contents .= "\n";
            $feed_contents .= "\n";
            foreach ($items as $item) {
                $feed_contents .= '' . substr($item['title'], 0, $title_length);
                $feed_contents .= "\n";
            }
            $feed_contents .= "\n";
        }
    
        return $feed_contents;
    }
    
  25. Posted October 10, 2007 at 8:52 am | Permalink

    Scott: good. I’ve just edited a bit your code to let WordPress show it better… when I got a minute, I’ll study your changes maybe for the next release of aggr. Thanks.

  26. Posted October 15, 2007 at 5:23 am | Permalink

    I love the plugin, Also I twisted it a lil as somo of the commenters taught it, but there is a little problem, I cant use it directly in my sidebar… how I do that???

  27. Posted October 19, 2007 at 9:57 am | Permalink

    david: sorry, your comment was waiting in the spam box. Anyway, aggr is not a widget plugin so it can’t be placed on a sidebar… maybe I’ll write a widgetized version of it.

  28. Posted October 21, 2007 at 1:04 am | Permalink

    Seems the latest svn update has broken aggr, most likely they are doing some strange caching now of the magpie data… will look into it and see if there is an easy fix.

  29. Posted October 21, 2007 at 9:33 pm | Permalink

    Scott: thank you! I wasn’t aware of this change: I’ll look at it ASAP. Thanks again.

  30. Posted October 29, 2007 at 10:55 am | Permalink

    Scott: it seems that the problem you reported was fixed before 2.3.1 because aggr works fine with the brand new release.

  31. Posted October 29, 2007 at 8:28 pm | Permalink

    Yeah I am thinking it may be something I did while playing around. RSS feeds are displayed, just not being updated.

  32. Posted December 3, 2007 at 4:10 pm | Permalink

    Hello.
    This comment helps me to let the subscribers know that I’ve just released
    http://perassi.org/p/aggrw/
    which is a widgetized version of aggr.

  33. Posted December 20, 2007 at 1:18 pm | Permalink

    High!

    I just discovered your plugin on the WordPress Plugin Database… my primary question is: can I use aggr to combine several RSS feeds belonging to the same category to one feed, and all of these “multi-feeds” once more to one single pool of news, from which the 20 or 30 most recent ones are displayed on the frontpage, ordered by date?

    See you in Khyberspace!

    Yadgar

  34. Posted December 20, 2007 at 3:10 pm | Permalink

    Yadgar: you can, on a given page, show any reasonable number of feeds and, using $item_count, you can even decide how many posts - for a given feed - your page will show… so the answer to your question is “yes, mostly” (it won’t be exactly like what you’ve just described). aggr can work pretty well aggregating feeds on a page - and I’m sure you’ll find it quite useful - but it is not like a planet software.

  35. Adrian
    Posted December 22, 2007 at 7:32 am | Permalink

    Would be good to be able to put into post template…

  36. Posted December 22, 2007 at 1:37 pm | Permalink

    Adrian: I’ve never tried to put it inside a template… it shouldn’t be hard though. I could study your idea. Thanks.

  37. Pete
    Posted January 26, 2008 at 7:39 am | Permalink

    Hi,

    I installed this in the plugins and activated it. When i placed a feed on a post it came up blank with a “Feeds listed by aggr”. I tried multiple feeds, but none worked. I am on Wordpress Version 2.3.2, any ideas? Thanks

  38. Posted January 26, 2008 at 11:49 am | Permalink

    Pete: old feeds, maybe? Try with my feed or a feed with recent news on it.

  39. clyd
    Posted January 27, 2008 at 6:33 pm | Permalink

    Hi,
    this is excellent, would it be possible to display an excerpt of each topic ( say mabye around 100 characters of each topic below the links)

    Regards!

  40. Posted January 27, 2008 at 9:56 pm | Permalink

    dyd: yes, it is possible. I don’t remember the name of the field in the associative array but it is possible, of course.

  41. Joy
    Posted January 28, 2008 at 5:46 pm | Permalink

    My feeds page was working till about 6 months ago– now i get an error message. I work on a Mac and when I try to download the zip file, it doesn’t seem to be working. Any ideas?
    Thanks!
    Joy

  42. Posted January 28, 2008 at 6:28 pm | Permalink

    Joy: I’m sorry but it’s quite hard to guess the reason of your problem. You could tell me more (even by email).

  43. Posted March 10, 2008 at 11:42 am | Permalink

    В плагине отображаются только заголовки, но иногда хочется, чтобы показывались и описания новостей.
    Немного попробовал изменить плагин aggr чтобы он показывал и описание новостей.
    Посмотрите здесь - http://live.amorg.ru/?page_id=1709#comment-122
    Может стоит включить такую возможность в новый релиз плагина?

  44. Posted March 10, 2008 at 3:53 pm | Permalink

    ОбозревателЬ: I don’t speak Russian (is that Russian?) but I’ve understood your changes creating a diff file from my version against yours. I could provide some sort of localization in the future… :)

  45. Posted March 10, 2008 at 4:45 pm | Permalink

    it’s Russian :)

    sometimes you want to show not only the headlines, but news and description.
    I tried to change.
    This in turn may release?

  46. Posted March 10, 2008 at 7:18 pm | Permalink

    ОбозревателЬ: do you mean if your changes may be integrated in a future release of aggr? I can’t exclude it but first I should add an interface to it to add/remove options for its output.

  47. Posted March 19, 2008 at 6:31 pm | Permalink

    @carlo: complimenti per il plugin.
    Se voglio richiamare la funzione all’interno di un tema, anziché di un articolo o una pagina, come la devo richiamare?

  48. Posted March 19, 2008 at 6:36 pm | Permalink

    Alberto: non so se sia sufficiente per le tue esigenze ma potresti provare ad usare aggrw (la versione widget di aggr), vedi http://perassi.org/p/aggrw/

  49. Posted March 28, 2008 at 6:03 am | Permalink

    Hi there

    This might be what I want … only way to find out is to get it running and see. But I am failing at the moment.

    In the last couple of days I’ve only just started with rss. So far I have created a load of pipes in yahoo. I can insert these into webpages I create as I have some javascript in the head which controls the format of the output. Then in the body area I put some more javascript that runs the rss feed from my pipe.

    I can’t work out in pipes where I get the url that aggr needs/wants. So far I’ve tried a couple of things and nothing shows up on my blog post. I have checked and my pipe does have results.

    I have specifically tried two things. From my pipes page:
    1] clicked on my pipe so it was showing, then near the top grabbed the url where it said “pipe web address”
    2] Clicked on the orange rss icon in the “use this feed” area and got “get as rss”

    I have tried both these and nothing displays in the post.

    With [2] above, I was posting this, exactly, into the code window of where you write a post:

    Any clues what I might be doing wrong?
    Thanks.

  50. Posted March 28, 2008 at 9:40 am | Permalink

    angela: your “inline test” page doesn’t show any feeds. Its source shows a comment that says you used an inline feed (plugin?) written by kruyt. I didn’t understand everything you wrote.
    Perhaps:
    1 - if it is compatible with your requirements, try to use aggr alone and follow the instructions at the beginning of this page;
    2 - a better (simpler and shorter) description of your problem (step-by-step) might help… even privately, by email. :)

  51. Posted April 27, 2008 at 7:46 pm | Permalink

    I have this message.
    Warning: array_slice() [function.array-slice]: The first argument should be an array in /mnt/143/sda/8/3/rapport.eric/wp-content/plugins/aggr.php on line 39

    With your RSS feed, it works, but with some other, it doesn’t work.

    This is the feed : http://www.directetudiant.com/rss/rssAchat.asp

  52. Posted April 28, 2008 at 3:27 am | Permalink

    How do I aggregate multiple feeds? Is it allowed?

    Thanks.

  53. Posted April 28, 2008 at 8:35 am | Permalink

    Eko: let me investigate it. I’ll let you know.

  54. Posted April 28, 2008 at 8:39 am | Permalink

    Alfie: aggr doesn’t work like a planet so you can have many feeds in a single page simply repeating many times the call to aggr…
    in other words, write lines like
    <!--rss url="http://my.feed/one/"-->
    <!--rss url="http://my.feed/two/"-->
    <!--rss url="http://my.feed/three/"-->

  55. Posted April 28, 2008 at 9:05 am | Permalink

    Eko: the feed you’ve provided for your example doesn’t validate at http://validator.w3.org/feed/
    That could be one of the reasons of your problem.

  56. Posted April 28, 2008 at 1:46 pm | Permalink

    Argh crap !
    I’ll contact the website to validate his feed. Thanks for your support.
    But I don’t understand why, when I use one validated feed and one unvalidated feed (on the same page) it’s run ?!?!

    Nice plugin ;-)

  57. Posted April 28, 2008 at 1:50 pm | Permalink

    Eko: I suppose that it happens because there are two independent calls of aggr on the same page (one calls a valid feed while the other calls an invalid one).

  58. Posted April 28, 2008 at 5:09 pm | Permalink

    I’ve removed this from a few of my WP sites because it was not working with various feeds (one was from digg, another from google).

  59. Posted April 29, 2008 at 8:41 am | Permalink

    Shawn: aggr retrieves feeds using MagpieRSS (that is the standard RSS integration tool of WordPress) so if a feed can’t be fetched by aggr, it can hardly be correctly fetched by MagpieRSS and, AFAIK, by WordPress too.

  60. Posted May 2, 2008 at 11:16 am | Permalink

    Thanks for your support. It’s a great plugin :)

  61. mirykel
    Posted July 22, 2008 at 7:30 am | Permalink

    carlo my brain is fried. I read the entire page trying to figure out how to make this work for me but i get the same message error message as thomas from july 9 of 07 …

    I installed and activated the plugin, then created a new Page with the line as the only thing in the page.

    The error message I get is:

    Warning: array_slice(): The first argument should be an array in …/wp-content/plugins/aggr.php on line 34

    What do you suppose went wrong?

    i followed your instructions but i still got the error message..

    I also noticed that in one post you said to input

    and in another post you put

    the former gave me the error message and the latter gave me nothing at all

  62. Posted July 28, 2008 at 7:45 pm | Permalink

    mirykel: I’m just back from holiday. Sorry for the delay of my reply. A cause of your problem could be a missing the format of the feed you are trying to fetch or a missing “/” at the end of it… did you try with my feed? You can mail me directly if you wish.

  63. Posted July 29, 2008 at 10:08 am | Permalink

    This is extremly usefull plugin!
    THank You Very much!
    Respect!

  64. Posted September 24, 2008 at 3:00 am | Permalink

    Il plugin funziona molto bene, lo sto usando come aggregatore su una pagina di wordpress sul mio sito. Una domanda, vorrei invece che visualizzasse anche le immagini, usando naturalmente un feed di Flickr, in modo da potere creare una galleria con le immagini più interessanti di Flickr. Grazie!

  65. Posted September 24, 2008 at 9:59 am | Permalink

    Davide: ho fatto un provino (con un feed di flickr) e ci sono riuscito.
    Modifica (dentro aggr.php) la riga

    $feed_contents .= "</a></li>\n";

    con questa

    $feed_contents .= "</a>" . $item['atom_content'] . “</li>\n”;

    Ci sono soluzioni migliori certamente… ma questa dovrebbe darti un buono spunto.

    Lasciami un link (anche quello di aggr) dal tuo sito, come credits. :)

  66. Posted September 24, 2008 at 2:24 pm | Permalink

    Grazie davvero! Corro subito a provarlo e metto il link al tuo sito immediatamente. Complimenti cmq, sei davvero ingegnoso :-)

24 Trackbacks

  1. By BloggingPro China » WordPress Plugin: aggr on July 7, 2007 at 2:30 am

    [...]   aggr,在文章中引用某一个RSS源的内容。   上传激活。在文章中用如下代码插入"<!–rss url="http://perassi.org/feed/"–>" [...]

  2. [...] Plugins Page | Download [...]

  3. [...] aggr: еще один агрегатор фидов. Зная кривизну популярного SmartRSS, стоит его попробовать. [...]

  4. [...] die WordPress Plugin Sammlung, habe ich einen recht netten kleinen RSS Feed Aggregator Namens aggr gefunden, der den Spieß mal umdreht und alle möglichen Feed von euch in euren Blog holt anstatt [...]

  5. By   links for 2007-07-11 by SridhaReena on July 12, 2007 at 1:18 am

    [...] temporaneità » aggr allows you to place the contents of an RSS feed into your pages or posts. (tags: wordpress plugin rss) [...]

  6. By WP Plugins DB » Plugin Details » aggr on July 12, 2007 at 1:44 pm

    [...] Visit [...]

  7. By And He Blogs » links for 2007-07-18 on July 18, 2007 at 8:24 pm

    [...] temporaneità » aggr (tags: wordpress plugin rss aggregator feeds) [...]

  8. [...] temporaneità » aggr - Wordpress plugin om RSS feeds in pagina’s of posts te plaatsen. [...]

  9. [...] aggr: еще один агрегатор фидов. Зная кривизну популярного SmartRSS, стоит его попробовать. [...]

  10. By Причины переезда « #от скуки on September 27, 2007 at 2:03 pm

    [...] Aggr [...]

  11. [...] Aggr [...]

  12. [...] link count, and limited title expansion, and documented my small changes on the authors website ( http://perassi.org/p/aggr/ ).  Sounds more involved than it was… just added two variables and used substr to limit the [...]

  13. [...] Aggr [...]

  14. [...] Aggr 允许你在文章或者页面中加入RSS Feed。 [...]

  15. [...] Aggr 允許 在文 或者 面中 入RSS [...]

  16. By Elaborate | ARBU on November 18, 2007 at 1:39 am

    [...] development blog on the fyneside.com MU installation of WordPress. On this project we have used the Aggr plugin to display RSS feeds on the front page of the main blog of the MUWP (it works beautifully) and the [...]

  17. By Vitriol on April 15, 2008 at 11:56 am

    [...] aktuellen Suchfilter werden automatisch gespeichert und stehen als RSS Feed zur Verfügung. Mit dem WP Agg-Plugin habe ich hier einen Demo-Feed [...]

  18. [...] Aggr 允许你在文章或者页面中加入RSS Feed。 [...]

  19. [...] Aggr 允许你在文章或者页面中加入RSS Feed。 [...]

  20. [...] Robert Burns audio file was placed in the category titled “burns” (no quotes). We then used the aggr plugin (a fork of the aggregate plugin) to pull the RSS feed containing all the posts in the category [...]

  21. [...] aggr (v. 1.1 ) by Carlo Perassi. [...]

  22. [...] listed by aggr. By Permalink • Print • Email [...]

  23. [...] listed by aggr. By Permalink • Print • Email [...]

  24. By jimgroom » UMW Blogs support videos for WPMu 2.6 on August 27, 2008 at 10:42 am

    [...] Feeds listed by aggr. [...]

Post a Comment

Your email is never shared. Required fields are marked *

*
*