I have this code:
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'n_de_personas',
'value' => $selection1,
'compare' => '='
),
And it works fine getting from the database the posts whose value of the key matches the value of $selection1 variable. But I need it to work for the values that match $selection1 and bigger ones. So I modified the code to:
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'n_de_personas',
'value' => $selection1,
'compare' => '>='
),
And it also works, but only from 0 to 9. When it compares over 10 it goes wrong. Please could anybody help?