Support

Account

Home Forums Front-end Issues Sort by one field, and then by another Reply To: Sort by one field, and then by another

  • WP does not include any way to order posts by category. If you were doing
    – Category
    – – Series
    – – – Date

    I would tell you to get the posts in each term separately, but since the category is the last thing, that won’t help you.

    The only way that I can see to do this is to loop through the posts twice. The first time creating a separate array to store them in and somehow ordering them the way you want and then the second time to show the posts you stored in the array. But I’m not really sure how to do that.

    Another choice would be to somehow do multiple queries, not sure about this either. Maybe do a query for each for each season in each series ordered by date.

    Sorry I can’t be of more help.