Ok, so i got this far:
$terms = get_terms('vagas_tipo',
array(
'orderby' => 'slug',
'order' => 'ASC',
'hide_empty' => 1,
'fields' => 'ids',
));
$nivelquery = array(
'tax_query' => array(
array(
'taxonomy' => 'vagas_tipo',
'field' => 'id',
'terms' => $terms,
),
),
'orderby' => 'meta_value',
'meta_key' => 'salario',
'order' => 'DESC'
);
$vagasquery = new WP_Query($nivelquery);
WP_Query($nivelquery) and the loop will now print every post registered using my custom taxonomy in $terms, and order them by the meta_key ‘salario’.
Problem now is: ‘meta_key’ doesn’t contain the terms registered with my custom taxonomy.
So, i either need to add a new update_post_meta declaration when saving the post, to have a new meta_key display the same value as a the taxonomy being saved, or some other solution i can’t think of now.
any ideas?