SPECIAL THANKS TO THIS ARTICLE: http://dotnordic.se/sorting-wordpress-posts-by-several-numeric-custom-fields/
$args = array(
'post_type' => 'property',
'tax_query' => array(
array(
'taxonomy' => 'rc_repl_status',
'field' => 'slug',
'terms' => 'sold'
)
),
'posts_per_page' => 100,
'meta_key' => '_rc_repl_property_year_sold',
'meta_query' => array(
array(
'key' => '_rc_repl_property_year_sold' // do this to order by two meta field VALUES
),
array(
'key' => '_rc_repl_property_acres', // do this to order by two meta field VALUES
),
),
);
// do this to order by two meta field VALUES - This takes generic values and
// can be used with any WP_Query meta_query
function customorderby($orderby) {
return 'mt1.meta_value DESC, mt2.meta_value+0 DESC';
}
// Now apply your filter. Add it before your query and remove it
// afterwards to make sure it doesn’t affect subsequent queries.
add_filter('posts_orderby','customorderby');
$query = new WP_Query( $args );
remove_filter('posts_orderby','customorderby');