This is how meta_key/_values work. How you store your values is case sensitive.
Example meta_key = "foo'
and meta_value="Bar"
Would return the result you are looking for:
$posts = new WP_Query( 'post_type=post&meta_key=foo&meta_value=Bar' );
Would not return the result you are looking for:
$posts = new WP_Query( 'post_type=post&meta_key=foo&meta_value=bar' );
However it does appear that your database can be setup as case insinsitive and cause some issues.
Please note that if your database collation is case insensitive (has with suffix _ci) then update_post_meta and delete_post_meta and get_posts will update/delete/query the meta records with keys that are upper or lower case. However get_post_meta will apparently be case sensitive due to WordPress caching. See https://core.trac.wordpress.org/ticket/18210 for more info.
Reference: update_post_meta for more info
Related Posts:
- Getting attachments by meta value
- WordPress altering my custom query, How to fix it?
- Fetch Record based on meta key dates
- how to make members list directory through wordpress post custom meta key.
- Large AND OR query timing out
- How do i create a custom post query when the meta value is an array?
- Trouble with serialized metadata
- Query against multiple locations within single custom post type post
- Can wp_query return posts meta in a single request?
- Use REGEXP in WP_Query meta_query key
- Meta query with string starting like pattern
- compare meta_query in get_posts arguments
- meta_query where value is equal to given value
- querying with custom meta field with meta_query
- Order by meta_value_num DESC and meta_value ASC on WP 4.0
- What is an efficient way to query based on post_meta?
- WP_Query not working as expected for attachments and custom meta_query
- How can I create a WP_Query that returns posts where one meta_value
- WP Meta Query for some meta (array) values
- Querying by taxonomy vs Querying by Custom fields Speed Comparison
- How to get sum of meta_values of a meta_key in wp_query according to conditions
- Order by meta_key in custom post type doesn’t affect the query
- meta_key and meta_value not working together
- Order posts by meta value and Date
- Order Posts by meta value AND published date
- Get meta info related to current post
- Group WP_Query by meta_key date
- exclude posts with a specific custom field and value
- Performance when getting post meta for post retrieved by meta value
- Get attachment by meta_key value
- Display custom field meta outside loop, site wide
- Meta_query with multiple keys and multiple values
- meta_query BETWEEN, but the range is stored in the custom field
- Extend product search with meta in WooCommerce
- meta_value_num not ordering all items
- meta_compare not comparing whole integer
- Is it possible to retrieve all posts with a certain value for metadata?
- Filter posts by comparing custom meta value against postdate
- Display posts with specific value first in query
- Get every post with value in meta key
- Order WP_Query results by meta key value in custom query
- Nested array issue in meta_query
- Display post meta conditionally based on it’s value
- add_query_arg to compare and display events from a certain date
- Comparing 2 Decimal Numbers from custom fields and displaying posts
- Query posts by searching for a string in a meta field
- WP_Query meta compare must include ALL array values
- meta_query weird behaviour, static int will work, but not user data
- Query multiple post types, but different order for each
- Order by the first array within a meta_query
- Query ACF relationship field – Comparator IN – Value array
- ACF: How to query for a given value count of an array like field? (e.g.: How many rows has a `flexible_content` field?)
- How to _GET multiple value checkbox WP_Query in Custom Toxonomy / Custom Fields
- wp query to use both author id and meta_query
- WP Query – grouping posts by same meta key, adding together values from another key
- Meta query ignores multiple values of the key
- meta_query is overriding default search
- show most viewed post
- Comparing Meta Field date in WPQuery using Meta_Query?
- Why can my filter query SOME metadata but not other metadata?
- Getting posts by custom field value
- WP_Query, ACF field and array
- How to set meta_query if get_post_meta returns nested array for that key? [duplicate]
- Order by Date Custom Field
- Query by meta value (add a dropdown of all values)
- Order Posts By Custom Field That is an array of objects
- Saving custom fields for WP_Query to retrieve
- Meta key in wp_query bug?
- Custom WP_query and integrating into theme file
- How to show all the associated posts with specific date of data metabox?
- WP Meta Query at depth 2
- Using custom field as ‘orderby’ value causing post grouping by publish date
- WP_Query Posts by Metadata from Option Tree
- Compare meta key separation
- Sorting Posts with meta value not working
- Return a single custom post from multiple meta queries
- Custom Search Query – include only custom fields and title
- query post based on comparison
- Querying meta values within an array
- Get posts by meta value except one post [closed]
- WP_Query by meta key not returning any posts
- Extend search query to search meta keys values based on search string
- Does tax_query really beats meta_query in all situations?
- Finding all results from database within 500 miles of the given latitude and longitude [closed]
- Display link to taxonomy archive only if it has posts with certain custom field values
- Programmatically set ‘meta_query’ for filter
- Complex Orderby Parameters: How to query with multiple orderby parameters using meta_value_num?
- WP_Query: include custom post type only with specific meta value
- How to provide meta_key array to wp_query?
- How to set up hierarchical relationships without using plugins / meta query
- Meta query compare for ID’s greater than specific ID
- meta_query with meta values as serialize arrays
- Unable to gather Image URL from Custom Post Type’s; Custom Meta Field
- Multiple WP_Query args combinations according to post type
- How can I modify standard search query to include also ACF custom fields values?
- Best way to Order Post in Home without a plugin
- Loop through multiple custom fields with increasing number
- 294 Queries on Mainpage of WordPress
- Use value from meta key array for use in WP_Query
- WP_Query sort by ACF date field (newest first) with blank dates first