Depending on your timeline or how much you want to live on the edge, there were some great improvements that are set to be introduced to 4.1 that I think will allow you to do just what you’re looking to do. If you want to live on the edge a little, you could develop with the 4.1 beta and switch to the release at the time of launch (be sure to file bug reports if you find them 🙂 )
Here is a link to the make post that goes into a bit more detail: https://make.wordpress.org/core/2014/10/20/update-on-query-improvements-in-4-1/
Related Posts:
- Changing the meta_query of the main query based on custom query_vars and using pre_get_posts
- pre_get_posts filter meta_query without conflicting existing meta_query
- pre_get_posts order by not working
- Single meta_query query using OR instead of AND in request’s WHERE statement
- Help ordering Post loop by two meta values
- Order ascending is ignored in meta query?
- Multiple meta_key ordering with pre_get_posts
- Sorting search results with custom dropdown
- meta_query is overriding default search
- Pre get posts sort by meta key returns no results if meta key does not exist
- Sort posts in dashboard using custom field; also include posts where field isn’t set
- Looking for a way to exclude frontpage and nav menu from query filter
- Meta_query compare operator explanation
- Nested meta_query with multiple relation keys
- meta_query ‘compare’ => ‘IN’ not working
- Sorting: custom query with orderby meta_value_num THEN by title
- Reduce or prevent calling of update_meta_cache
- WP_Query with checkbox meta_query
- ACF Relationship Field Search Filtering [closed]
- Query Multiple Post types each with own meta query
- How-to exclude terms from the main query the most performant way?
- ACF datepicker meta_query Compare Dates in m/d/Y g:i a – Not in Ymd Format
- Meta Query with date and time on the same Day before given time
- How to grab metabox value in wp_query meta_query key
- Is “orderby” in WP Meta Query conflicting with Meta Query?
- How can I create a WP_Query that returns posts where one meta_value
- WP Meta Query for some meta (array) values
- Sort users by meta_value_num
- How to count data records in wordpress which have same meta_value in wp_postmeta table?
- How to target the default Recent Posts and Recent Comments widgets with pre_get_posts?
- WP Query – Get WooCommerce Products with variation that is in stock
- Meta_query with or without value
- How to sort posts in admin by titles with dd.mm.yyyy format?
- How to Modify Taxonomy Archive Page with Search Parameter?
- Including only current user’s posts in search
- wp_query not searching with apostrophe
- pre_get_posts Remove tax_query Completely
- Add condition of user capability in WP_query
- Custom query based on meta key – Reduce three states to two in results?
- How to make Meta Query case sensitive?
- Performance when getting post meta for post retrieved by meta value
- Show Sticky Post at the top but do not show again in the loop?
- Any number in meta key (wp query)
- Remove category from query (show all posts in archive.php) pre_get_posts()
- Query by multiple meta elements not seeming to work – wordpress is timing out
- How to display multiple custom fields with the same meta_key in an ascending order?
- Meta_query with multiple keys and multiple values
- How does one perform a sub query with different post types
- Tax query AND/OR meta query [duplicate]
- New WP_Query calls Pre_get_posts filter twice
- meta queries do ‘either/or’ checks
- WP Query ordering on a meta field for posts with a date in the future not ordering by datetime
- Is this meta query problematic?
- Appending to existing WP_Query’s meta_query if exists
- Get every post with value in meta key
- get_page meta query not working, maybe a bug?
- Get meta_value of a specific meta_key from all posts belonging to a specific custom type
- Custom query filter by ACF date custom field
- Query by date from custom field
- Nested array issue in meta_query
- Child pages not affected by orderby
- Error in meta_query not get result
- How to get current page nearest parent id?
- meta_query with array as value with multiple arrays
- Why doesn’t my WP Meta Query return any results?
- Sort posts using multiple custom fields and menu_order in single query?
- Order (by ASC) posts with meta_key so posts without values are last
- Search filter between promo and exact price
- meta_query – check for multiple meta values in key which holds an array of values
- WordPress Meta Query Null Values Order
- Searching for a specific month in a metadata saved as Timestamp (Wp_Query)
- Why can my filter query SOME metadata but not other metadata?
- Getting posts by custom field value
- WP_Query on custom key and value
- Get posts having meta value between two numbers
- wordpress multiple meta value query is not working
- Strange results from WP_Query
- How to set meta_query if get_post_meta returns nested array for that key? [duplicate]
- Sorting with meta_query and multiple, optional meta keys
- Modify a query with no results in pre_get_posts
- How order by works?
- Custom Order Current Query: By Meta Key and Category
- meta_query with relation = AND not working as expected when combining EQUALS with NOT EQUALS
- Query by meta value (add a dropdown of all values)
- Order Posts By Custom Field That is an array of objects
- Orderby query does not work for custom fields even with meta query
- make query more simplest and in one query
- WP_Query returns empty if meta_query has more than 7 values
- Use not custom fields in get_posts() meta_query?
- WordPress meta_query not working
- Using orderby with 2 meta keys
- wp_query – Modify $query to include duplicate content
- Filter WP_Query output before it is accessed (pre_get_posts)?
- Passing conditional arrays to WP_Query() [closed]
- Avoiding page loop
- Custom query (author is post_author or meta co_author) with Pagenavi pagination
- Get all user with both meta_value
- How do I have multiple metaqueries inside one wordpress query
- WP query with multiple custom meta not respecting orderby
- Display only posts with thumbnails