Support » Fixing WordPress » Most Recent Post order incorrect (how to correct?)

  • Resolved zlkorb


    One problem that I am having is that the most recent post order seems to be incorrect.

    For example, by clicking on manage / posts link in the admin panel, the results never change. The order of the posts is being sorted by some value that I cannot figure out (and it isn’t the Post ID – or by the newest post).

    Currently, my admin panel lists the most recent posts as starting with Post ID 352. The next post listed is 10, and then it is 110. It then continues up to 241, then jumps to 3.

    On the webpage, it is correctly putting the most recent post at the top, so that is fine.

    The only problem is that the rss file seems to be pulling the post order (or the newest posts) from the same place as the admin (since the rss file never changes and shows the same order of posts at the admin, which is not correct).

    I host the site at dreamhost (which uses mysql) and can certainly make any Database changes (although I don’t know what it all means, I can follow instructions well and am not afraid to play around).

    Just playing with wordpress, my guess is that somehow/where there is a file that I need to update, but I’m not sure. I’ve searched for an answer, but I can’t quite figure this one out. Any help would be entirely appreciated. Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Strange, because on my blog they are ordered on reverse date, both at Manage and in the feeds. What version of WordPress are you using?

    I’m almost sure that it’s WP 2.0 (I started with wordpress a few weeks after the commencement of 2.0, so I’m sure I got the most recent version, back then).

    In 2.0.3 there is an ORDER BY post_date DESC in the query that populates the manage screen. I don’t have a 2.0 system handy to compare.

    You can verify your version at the bottom of the Admin section, or by viewing the source of one of your blogg pages and looking at the generator meta tag.

    Is there a reason why you’re still running 2.0 instead of 2.0.3?

    Just laziness – but I’ve updated to WP 2.0.3. I even hand uploaded some of the files.

    I’m super confused now, but because I have played with (err… manipulated) the wp-admin/edit.php file – changing the exact line that you cited. I changed it to sort by ASC and inserted different fields in place of post_date (e.g. I changed post_date to post_title, ID, and any number of other fields) and it didn’t change the results at all!

    I confirmed that the admin page is pointing to the correct page (rollover the “manage” link, it points to wp-admin/edit.php page in the right database).

    So now I am completely stumped. I even turned off all the plugins that seemed to refer to posts at all. The database looks like it’s ok (I don’t see anything that sticks out that would result in that order of pages). There must be something goofy somewhere.

    The only real reason I’m concerned about this is that the rss output is incorrect. I have no problem finding the posts in the admin page – I just wish I could get the rss to update correctly (and show the new posts, rather than the old ones).

    One thing I did learn is that the “ORDER BY post_date DESC” query seems to control what is the pull down box (monthly date for archives).

    I can’t quite figure out how wordpress pulls the order of posts for the manage posts page from the DB.

    Yes! I got it. This post helped

    It appeared that the <?php get_archives(‘postbypost’,’6′,’custom’,”,”); ?> query was running correctly (the posts were in the right order) so I know that was ok. Somehow it was figuring out the right order.

    The link above noted that they were having problems with “nicer archives” plugin. It was installed on my computer (not sure what it does) so I deactivated it. Voila. Everything’s working.

    Many thanks to Nazgul for their help in trying to diagnose this.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Most Recent Post order incorrect (how to correct?)’ is closed to new replies.