Sort just one category (2 posts)

  1. Frazzled
    Posted 10 years ago #

    Hi, I'm trying to figure out a way to reverse-sort just one category. That one I'd like to have in ascending order, so the posts would be from earliest down to latest.

    In looking over the loop code, it seems to me that the easiest (safest?) way would be to have a double loop. The first one checks for the category id and does all the usual things to the posts.

    Otherwise, there would be a drop-through to the original loop that would perform as always. Am I right about this? If so, what would the code be to check for the particular category?

    Also, what effect, if any, would this have on the main page? I keep the five most recent posts there. I'm wondering if sorting one category in reverse might keep the posts from that category on the front page? Not what I want ;)

    All help is appreciated. Thanks!

    - Frazzled

  2. moshu
    Posted 10 years ago #

    The easiest way: make a category template for that category and add the order parameter tyo that Loop.

Topic Closed

This topic has been closed to new replies.

About this Topic