sorry for my bad english.
i got this code:
$consumibles = get_posts(array(
'post_type' => 'consumibles',
'meta_key' => 'orden',
'orderby' => 'meta_value_num',
'order' => 'ASC',
'meta_query' => array(
'relation'=>'or',
array(
'key' => 'marca', // name of custom field
'value' => 'evolis', // matches exaclty "123", not just 123. This prevents a match for "1234"
'compare' => '=='
),
array(
'key' => 'marca', // name of custom field
'value' => 'todos', // matches exaclty "123", not just 123. This prevents a match for "1234"
'compare' => '=='
)
)
));
i am trying to sort by orden a custom field, but only works with out the meta_query part is anyone knows why?
Thanks in advance