• I use WordPress 3.3.2. with the TwentyTen theme. I display headlines from other RSS feeds on my sidebar, using the default RSS widget.

    The feed is a calendar of upcoming events. The order of the events in the RSS-feed-file is chronological. I want to display the first 5. However, I get the last five, the once that occur further in the future, and are on the bottom of the feed-file.

    How do I display the nearest (in time) events first? Firefox shows the feeds in the correct order. The pubDate field in the file is not relevant.

    Jan-Gerard

Viewing 5 replies - 1 through 5 (of 5 total)
  • That won’t be possible without an RSS plugin with extended functionality. Even then you’re going to be heavily reliant on the feed from the source site.

    Thread Starter JGeo

    (@jgeo)

    OK, that sets my direction. What is actually used by WordPress to sort the items? Is it the pubDate in the feed, or something else? If I ask the provider of the feed to ‘fix’ it’s output, what should I demand for?

    I can imagine that indeed calendar feeds differ from news feeds in the order of display of the items. However, I can’t find requirements for them, and how to cope with the intrinsic difference.

    It should be pubDate, yes – although it might just be the first x items in the feed.

    If I ask the provider of the feed to ‘fix’ it’s output, what should I demand for?

    Are you sure that there’s anything to fix? It might be that all you need from an RSS plugin is the ability to either reverse the order of entries prior to display or skip the first x items.

    Thread Starter JGeo

    (@jgeo)

    It appears that for example Joomla outputs rss entries with the date they were created as the the pubDate value. The sorting of the items of a calendar in the rss output file is according to the event-date. So either Joomla should change the pubData such that the order is exactly opposite to that of the dates of the actual events.
    Or the RSS widget (now I use the built-in rss widget of WordPress/TwentyTen) should skip sorting the rss entries and publish them in the order of the file.
    I guess the latter would be easiest for me, since I have control over that. However, I tried several rss-widget-plugins, but none supports overruling the order of the items.

    Thread Starter JGeo

    (@jgeo)

    OK! kb-advanced-rss-widget does the job. I don’t even have to select the ‘reverse’ option.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to sort items in RSS-widget?’ is closed to new replies.