I use plugin wp post ratings, this plugin add a custom field with key "ratings_score". So I want to display posts only if meta_value is more than 9.
I have such code
<?php query_posts($query_string . "&meta_key=ratings_score&meta_compare=>=&meta_value=9") ?>
It's work fine, but when value is 10 or more - we have problems, because
Returns posts with custom field key of 'miles' with a custom field value that is LESS THAN OR EQUAL TO 22. Note the value 99 will be considered greater than 100 as the data is stored as strings, not numbers.
We can resolve this problem if do
<?php query_posts($query_string . "&meta_key=ratings_score&meta_compare=!=&meta_value=1,2,3,4,5,6,7,8,9") ?>
but this code - not work.
I also try such
$query = array(
'meta_key' => array('ratings_score'),
'meta_value' => array('11', '12', '13', '14', '15'),
'order' => 'ASC'
);
query_posts($query);
but work only first value (in code above "11").
How to set some meta_value?