Ok this one sounds a bit like tapping your head while doing circles on your stomach but it’s one that I’ve come across a couple of times now.
Normally when you have a taxonomy archive page it will do the usual thing of ordering that archive page with the last post first etc..
So how do you go about changing the sort order?
I’ve got a custom field which is a date – DepDate it is in the format of 20120329 (Year Month Date) and I want to sort the posts via that date rather than the post date. This would also work if it was say an alphabetical search on a custom field.
So the approach is to interrupt the loop and enter your own criteria to the $wp_query so in the example I was using the Genesis Framework so I’ve hooked this before the content using ‘genesis_before_content’
Then using array_merge you append your own arguments into the default loop.
function tourCustomPost(){
if(is_tax('tourtype') ){
$today = date('Ymd');
global $wp_query;
$args = array_merge( $wp_query->query, array(
'posts_per_page' => 10,
'meta_key' => 'DepDate' ,
'orderby' => 'meta_value',
'order'=>'ASC'
) );
query_posts( $args );
//echo "<h1>hello</h1>";
//echo $today;
} // end of containing if
}
add_action('genesis_before_content', 'tourCustomPost');


Well, it acctually helped me very much!
But i’m still having a problem, and if know anything that can help me, i’ll be glad:
I used your snippet to order the houses by price (custom field wpcf-imovel-preco), it orders some of them, but after some houses, it looses the order and begins again, like this:
1) 120.000,00 2) 130.000,00 3) 139.000,00 4) 35.000,00 5) 36.000,00 6) 127.000,00
understand? any ideas? oh, the custom field is a text input
thanks anyway, cause the snipped worked i was looking for the awnser a lot
ansering my own comment: meta_value_num is the solution!