Support » Fixing WordPress » posts displaying in reverse order after upgrade?

  • I just manually upgraded a site from 2.3.3 to 2.7.1, no small feat, since the site is hosted by godaddy, which is a lame host… that said, a category page is now displaying posts in oldest to newest order.

    I know there are many posts asking about this but none of the suggested solutions seem to work. I have a site using v2.7.1 with all working as intended. On of the site’s pages (cat=’94’) displays posts from category-94 using a custom template (category-94.php)

    But it is displaying the posts in reverse order, with the oldest at the top — not sure why. If I look at the output, it’s sorting by ID oldest to newest. I would expect it to sort in reverse chron order by default. There is NOTHING in the template to tell it to behave in a non-default manner.

    I have tried all manner of using :

    <?php query_posts($query_string . "&amp;order=DESC") ?>
    or
    <?php query_posts($query_string . "&amp;order=ASC") ?>

    before the loop and there is nothing other than a wp_list_pages() function call in my sidebar before that code…

    IT DOESN’T WORK. The order is unchanged no matter which is used.

    Version 2.7.1

    Anyone else seeing this? Anyone have any solutions? I’ve even tried placing the custom query before all page markup (except for the header call)… nada.

    HELP?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi I’m not sure whether this will make a difference but worth a try. The correct syntax for query_posts parameter separators is not & a m p ; (no spaces) but a single ampersand character.

    The forum software now changes ampersands to &amp; and this confuses a lot of people. As I said, no guarantee, but give it a try.

    Hi,

    Please add this code inside the loop:

    <?php query_posts($query_string . "&amp;order=DESC") ?>
    or
    <?php query_posts($query_string . "&amp;order=ASC") ?>

    Thanks,

    Shane G.

    um, did you notice that is the EXACT code I used above?

    I have tried both the entity

    &

    and the &amp; version. Neither works. It may be a database issue but I’ve not contacted godaddy yet to find out.

    Thanks for trying to help, though. And if anyone else has suggestions I haven’t already tried, they are much appreciated!

    BTW, you can use the pre tag to keep the ampersand in it’s original state here in the forum (a pita, to be sure!)

    I have the exact same issue on 2.7.1 I cannot seem to find a solution either. Did you solve it syncbox?

    oldest to newest

    <?php query_posts($query_string . '&orderby=date&order=ASC') ?>

    newest to oldest

    <?php query_posts($query_string . '&orderby=date&order=DESC') ?>

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘posts displaying in reverse order after upgrade?’ is closed to new replies.