WordPress.org

Ready to get started?Download WordPress

Forums

listing posts in certain categories from old to new? (6 posts)

  1. mattpist
    Member
    Posted 8 years ago #

    hi, i have a website (www.squattheplanet.com) where i have multipule authors and i want ONLY the categories "StP Chapter 1" and "StP Chapter 2" to list the posts from the first posted to the last instead of vice versa. this is for readablity purposes, as id like the reader to start from the first story in the chapter instead of the last :). i want all the other categories to list as normal. is there a way to do this? i can't seem to find it in the codex.

    thanks!

  2. MichaelH
    Member
    Posted 8 years ago #

  3. mattpist
    Member
    Posted 8 years ago #

    it's an interesting plugin, but it won't do what im trying to accomplish here. thanks for the link though :)

  4. MichaelH
    Member
    Posted 8 years ago #

    Well then take a look at Category Templates and Template_Tags/query_posts.

  5. mattpist
    Member
    Posted 8 years ago #

    that was totally what i was looking for, thanks so much!

  6. syncbox
    Member
    Posted 8 years ago #

    I'm thinking you'd use a query on the page to show posts in ascending or descending order as desired? Something like:
    <?php
    if (is_category(4,5))
    {
    query_posts("order=ASC");
    }

    else {
    query_posts("order=DESC");
    }
    ?>

    or something like that...

    Look in the Template Tags for queries

Topic Closed

This topic has been closed to new replies.

About this Topic