0
votes

is there any solution to order the wordpress query in two different ways (in the taxonomy-template / archive)? first i want to order the query by meta_value in ascending order. after that, i want to order by title in descending order.

does anybody know a soution for that?

this is the actual query:

query_posts( wp_parse_args( $query_string, array(
    'meta_key' => 'metaname',
    'orderby' => 'meta_value title',
    'order' => 'ASC'
    ) ) );
1

1 Answers

1
votes

Take a look at: https://wordpress.stackexchange.com/questions/109849/order-by-desc-asc-in-custom-wp-query

Your solution involves having to set your first order by, then when creating a query wrapping a filter around it.