WordPress.org

Ready to get started?Download WordPress

Forums

RSS widget shows posts in reverse order (4 posts)

  1. superwad
    Member
    Posted 5 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.

    Thanks.

  2. superwad
    Member
    Posted 5 years ago #

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

    Thanks!

  3. superwad
    Member
    Posted 5 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
    Member
    Posted 4 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.
    Josh

Topic Closed

This topic has been closed to new replies.

About this Topic