2.7.1 query_posts meta_compare bug?!
-
With 2.7.1, for example, assign following to a post:
meta_key: number
meta_value: 5now you do query_posts():
query_posts(‘meta_key=number&meta_compare=>=&meta_value=100’);
The above will list the post which you have assigned a meta_value 5.
After spending many hours on this issue, I finally find out that ‘meta_compare’ is treating ‘meta_value’ as “alphabets”, not as values. It looks ‘meta_compare’ thinks 99 is ‘larger’ than 100 because the later one starts with ‘1’ while the first one starts with ‘9’.
Is this a bug?! If not then the related part of this document should be revised: https://codex.www.ads-software.com/Template_Tags/query_posts
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘2.7.1 query_posts meta_compare bug?!’ is closed to new replies.