• After looking everywhere for the answer to this, I’m hoping someone here can help out.

    All my categories have posts that show by title. This is the code:

    <?php if (is_category()) { $posts = query_posts($query_string . ‘&orderby=title&order=asc’); } ?>
    <?php if (have_posts()) : while (have_posts()) : the_post();

    But now I have one category where I want the posts to show newest to oldest. If the category name is ‘Articles And Essays’ (ID is 42), how can I put some code in there so WordPress shows posts in this one category differently to the rest?

    Thanks,
    Aisha

Viewing 1 replies (of 1 total)
  • Not tested, but off the top of my head, this should work:

    <?php if (is_category(42)) { $posts = query_posts($query_string . '&orderby=date&order=asc'); } ?>

Viewing 1 replies (of 1 total)
  • The topic ‘post order’ is closed to new replies.