Wp_query arguments strange problem.
-
Hello wordpress community!
I have a problem with my query argumentation. I use a custom fields text to output a value(a price) and this value is an String type. example value: “1500”
So, I would sort my post with a ‘compare’ => ‘between’.
The code below display my post where price is between 450 and 900. But whe I want to set my argument to go in example from 450 to 1400, it won’t display somthing more even if there are post with this prices.
When I use “between” with hundreds numbers it works fine. But when I use 1000 and above, it won’t display anything.
Is there a problem because I use string with number inside?
$args = array( 'post_type' => 'objets-a-louer', 'posts_per_page' => '-1', 'meta_query' => array( 'relation'=>'AND', array( 'key' => 'obj_louer_loyer', 'value' => array( '450', '900' ), 'compare' => 'BETWEEN', ) ), );
Thank you in advance!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Wp_query arguments strange problem.’ is closed to new replies.