WordPress.org

Ready to get started?Download WordPress

Forums

Posts in Reverse Order (13 posts)

  1. erika_conn
    Member
    Posted 6 years ago #

    I just started this blog: http://ceconn.com/whatsmellssogood

    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?

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    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.

  3. erika_conn
    Member
    Posted 6 years ago #

    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.

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

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

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

  5. erika_conn
    Member
    Posted 6 years ago #

    It is now. Still nothing.

  6. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    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.

  7. kosmos21
    Member
    Posted 6 years ago #

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

  8. Kafkaesqui

    Posted 6 years ago #

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

  9. stlytm
    Member
    Posted 6 years ago #

    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(); ?>
    <!--index.php-->
    <?php query_posts($query_string . "&order=ASC");>?>
    <!--loop starts-->

  10. rudolf45
    Member
    Posted 6 years ago #

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

  11. stlytm
    Member
    Posted 6 years ago #

    That worked great, now my posts are at the bottom now, great.
    check it out, http://www.itsmydeal.net/wordpress.
    Thanks

  12. onedotsix
    Member
    Posted 6 years ago #

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

  13. webmagnets
    Member
    Posted 6 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic