RSS widget shows posts in reverse order (4 posts)

  1. superwad
    Posted 7 years ago #

    I have two WordPress 2.7 installs on a website. Both are configured in exactly the same way (one is private, the other is public). The private install has a correctly working RSS sidebar widget. It shows the latest three blog entries. When you go directly to the RSS feed by clicking on the link, all entries are shown in a newest->oldest fashion.

    The public install does things differently. The sidebar widget displays the 3 oldest blog entries. When you go to the feed directly, it shows them in the correct order.

    The link to see this in action is: http://www.presstaging.com/blog/
    The link directly to the RSS feed is http://www.presstagingresourcecenter.com/blog/feed

    Hopefully somebody is able to help me figure this out.


  2. superwad
    Posted 7 years ago #

    Hi there. I still haven't been able to figure out this problem. Does anybody have any suggestions I can try?


  3. superwad
    Posted 7 years ago #

    Hello again. Can anybody please offer some assistance on this issue? I cannot find any differences between the two installations, yet the /blog/ installation displays ALL RSS links in reverse order. I added the RSS from the /wordpress/ install, and those were in reverse order too (though it showed a random set of articles).

  4. stompro
    Posted 6 years ago #

    Hello, I just ran into this same issue. RSS feeds displaying oldest items first. To fix it I changed the comparison operator for the function sort_items in wp-includes/class-simplepie.php.

    It was

    return $a->get_date('U') <= $b->get_date('U');

    I changed it to

    return $a->get_date('U') >= $b->get_date('U');

    And now feeds display in the order I would like, Most recent date first.

Topic Closed

This topic has been closed to new replies.

About this Topic