WordPress.org

Support

Support » How-To and Troubleshooting » RSS widget shows posts in reverse order

RSS widget shows posts in reverse order

  • 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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi there. I still haven’t been able to figure out this problem. Does anybody have any suggestions I can try?

    Thanks!

    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).

    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

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘RSS widget shows posts in reverse order’ is closed to new replies.
Skip to toolbar