In our archive.php
we show all the items which match our selected category. This works absolutely fine.
Then we improved it by adding (just before the loop) a sort and upping the posts per page from the default 10, like so:
$posts = query_posts($query_string . '&orderby=title&order=asc&posts_per_page=99');
This works even better.
Now, however we want to sort by more than one field, say menu_order
then title
. I don't see a way to do this using this query_posts / querystring syntax we have in place. Code samples all involve firing up a new WP_Query, losing track of the query_string. What's the solution?
query_posts
. See this question and this question for some hints on usingpre_get_posts
.