The problem is that you’re comparing 10000
and 10 000
as strings, and as such they are not the same value.
So, you either need to sanitize the strings to ensure that both return an equivalent value, or you’ll need to force them to be integers, so that they’ll be evaluated as the same value.
Edit
Your best solution is probably to replace your text form field with a select, that includes pre-determined entry values (e.g. 10,000, 20,000, 30,000, etc.). That way, you will have reliable data to use in your meta_query
.
Related Posts:
- How to do a meta query using REST-API in WordPress 4.7+?
- Meta query terribly slow
- meta_query sorting by 2 keys
- How to handle optional end date in compare clause in meta_query
- Using meta_query on pre_get_posts to exclude a particular meta_key value
- Best practice – Meta Query vs. post_clauses for “left join” ordering
- Different page parameters inside query
- Return posts with specific meta key first, but the rest in alpha order by last name
- meta_query key value from array
- LIKE %…% Meta Query
- Order by nested named meta queries with ‘exists’ and ‘not exists’
- Documentation for post meta
- Arrange Posts By Date In Order Of Closest To The Current Date
- Custom Upcoming Events List for Events Manager Plugin
- How to use meta_query to check if a meta field has something set?
- How to exlude posts that have certain meta_value?
- User Relationship
- WordPress Core – Optimizing meta_query generated SQL?
- Edit post_content on posts with Featured Image
- Display no post when metavalue is 0
- Use both meta query and tax query
- meta_query, number comparison, not quite working as it should
- Meta Query Compare with Date
- Query posts only if meta_value is not empty
- Does meta_query working with value paramater higher then 999?
- meta_query keys and sticky posts
- How to pass user meta_key and meta_value (values as array)
- meta_query compare=’!=’ with multiple custom fields
- Query posts with numeric meta values within a given range
- Fastest way to do meta query when I don’t need the actual posts, and just need post_id?
- meta_query not working on live site
- How do you get Posts by multiple meta_keys and meta_values with the Rest API V2?
- Meta query with regular expression does not work
- WP User Query Issues
- How to use meta query for greater than value in array?
- Wp Query custom search by meta query
- Filter posts by meta query?
- Help on multiple meta_query
- Meta query – How to display a null meta key
- pre_get_posts and set
- How to use orderby with meta_query?
- I would like to have add_post_meta to return the ID instead of true or false
- last_name + first_name orderby with meta_query [solved]
- Extend meta query arguments
- get_posts( $args ) return empty data
- how to get post meta where value is an array of key value pairs
- Meta Query Based on Month Range
- how to search all user meta data that have value like “vivek”
- Find posts by related taxonomy field
- wordpress meta value compare between two date
- Can I use pre_get_posts to add up values from two different meta_keys?
- WP JSON API meta_query not working
- get_users with Serialized Custom Meta Value
- Sorting posts by ACF field
- Ordering custom posts by meta field date
- latitude/longitude meta_query
- meta_query displays all results and none, my query is wrong
- How to properly escape values in meta query
- Delete all posts with a specific custom field using meta_query
- Fetch custom post related to a User
- How to Ordering by user meta
- Use meta_query in args for relationship
- meta_query Array
- meta_query compare “=“ returns nothing when it seems it should
- Order resultset by configured value and then list all the rest
- Issue with user meta_query
- How to get an archive page meta?
- Search for value(s) in meta field for a multi select
- Querying terms with calculations based on term meta data, sql vs. get_terms
- How can I create a meta_query with an array of dates?
- WordPress meta query not working
- Get meta_value from GDRating
- How to count items of meta query?
- WordPress meta query with meta serialized data array value
- Why does this incorrect pre_get_posts meta_query work for sort order?
- How to sort custom posts including null meta-values in admin columns with meta_query?
- meta_query not filering but meta_key works fine
- get posts meta query returning the latest post if no meta key found
- WordPress search between two newmeric values with a custom post type
- like_escape notice when using LIKE in meta query
- WP User Query with meta queries
- Search using specific meta fields only (excluding post title and content)
- How to fetch WP_User_Query with multiple role arguments [duplicate]
- How to get meta value based on latest post id with group by term name
- Meta query not returning results even though the sql contains the information
- Display Users from two roles in one list
- WP_Query with UNIX timestamp in meta query
- Multiple Queries with meta_query
- Get foreach for meta_query value
- Sort posts by post views and consider meta key
- Meta query “OR” comparison not working as expected with array
- order by meta_key [duplicate]
- WordPress Meta Query very slow with NOT EXISTS comparison
- Meta query with string NOT ending like pattern
- ACF meta_query field treated as “0” resulting in false negative search when testing ranges
- Merge meta_value’s into a single row and then loop
- Is it possible to customize meta query in this way?
- Ordering WP_Query results by second meta_key
- How making a new search box in admin post table working on a specific column
- wp_user_query with meta_value_num for leaderboard