Support » Installing WordPress » Posts in Reverse Order

  • I just started this blog:

    It is my attempt at focusing on the young who are just starting out housekeeping and need help organizing etc so they don’t fall into the fast food habit.

    Already I can see that I could run into problems. I just wrote my first post. My second post will be before this one, right? I want it to be after the first post. How do I do that?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Posts normally display in “Newest Post First” order.

    To reverse this, add this to your theme somewhere, just before your loop:
    query_posts($query_string . "&order=ASC");

    This overrides the normal “descending” order in favor of an “ascending” order, without changing anything else.

    Should there be something in front of
    query_posts($query_string . “&order=ASC”); ?

    Because I put it right after <?php get_header(); ?> in the index.php but nothing happened.

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Is it inside the php tags as well? All PHP code has to be inside php tags.

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

    It is now. Still nothing.

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Well, I don’t know what to tell you. That’s the correct answer. Perhaps you have a plugin or something else interfering. Also check the theme to make sure that there’s no other calls to “query_posts” to change your query.

    Does this work for those of us who us the wordpress website and have not actually installed the program???

    And if so, is it something that is inserted in the CSS style sheet.

    My guess is that the answers are no to both, but being a true newbie thought it better to ask any way…

    kosmos, the WordPress website???

    If you mean WordPress.COM, you cannot modify theme templates on a blog there.

    Note they provide their own support forum. Just for future reference. ;)

    I am running version 2.3.3, I put the code in and now when I try to open my blog, I get a blank page.
    <?php get_header(); ?>
    <?php query_posts($query_string . “&order=ASC”);>?>
    <!–loop starts–>

    Maybe that obsolete > in between ; and ? at the end?

    That worked great, now my posts are at the bottom now, great.
    check it out,

    In case this helps anyone else, the call to query_posts() does nothing if the WP-Sticky plugin is activated.

    Does this work with 2.5? What file does this code need to be added to?

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Posts in Reverse Order’ is closed to new replies.