I think you need to do something like this:
<?php
$args = array(
'post_type' => 'shop',
'post_status' => 'publish',
'posts_per_page' => -1,
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'cu_status',
'value' => array( 'pending', 'processing' ),
'compare' => 'IN',
),
array(
'key' => 'cu_date',
'value' => array( '2016-01-12', '2016-01-13' ),
'compare' => 'BETWEEN',
'type' => 'DATE'
)
)
);
?>
Related Posts:
- Display products from specific category in shop page
- Exclude post on loop by multiple meta key value
- How to query ‘posts_per_page’ to display a different blog posts index template?
- Query sticky posts with thumbnails
- Why is this coming back as null? Thats wrong. There is one post
- WP_Query on custom field and order results
- Any number in meta key (wp query)
- Two loops on archive page
- Check if loop has any categories?
- How to make search for posts using get method?
- Array as ‘key’ in WP_Query
- How to provide meta_key array to wp_query?
- Meta query compare for ID’s greater than specific ID
- WP_QUERY wrong ammount of posts
- Writing less unnecessary code with WordPress
- Use have_posts() with array of post results retrieved by $wpdb->get_results
- WP_Query not returning correct result with meta_query parameter
- How to separate two columns from one content on a page template?
- show most viewed post
- WooCommerce | AJAX | Product Pagination | Help me implement Ajax Pagination
- Second WP_Query loop shows data from main query
- Meta Query if Values Don’t Exist
- active link for most recent post on vertical tabs
- Custom loop – Isolating post meta output depending on current query taxonomy terms
- Get author meta data with no published posts in author.php?
- Get post count of current loop when using multiple queries on one page
- Changing the meta_query of the main query based on custom query_vars and using pre_get_posts
- Order by meta_value_num DESC and meta_value ASC on WP 4.0
- Query by meta_key and order by meta_value_num return orderby date
- WordPress altering my custom query, How to fix it?
- Looping through tabular data
- Order by meta_key in custom post type doesn’t affect the query
- How to create/modfiy WP_Query to search in post title OR custom field?
- Display featured products through custom loop in WooCommerce 3 [closed]
- Array Chunks and Inserting Varying HTML in WP_Query
- Multiple WP_Query loops with Pagination Not Working
- Multiple meta queries but arrange by specific meta value order
- Order Posts by meta value AND published date
- WooCommerce Only OnSale Products Loop Snippet [closed]
- ACF – Get lowest & highest value from field
- What format does the meta_query TIME type require?
- WP_Query filter and order by meta ordering by wrong joined table
- WP_Query last five posts, simply ordered by meta_value
- What is the random string I am seeing when I use get_query_var?
- WP_Query condition affects posts_per_page count
- Custom Search Not Consistent with Results
- Orderby is working with one query but not with other
- 1/3 of posts different class
- Adding column to wp_posts table or join wp_posts table with another table
- Changing sort order for presentation by Jetpack infinite scroll
- How to order posts by title after they have already been sorted by category
- get posts by meta_key from inside key of post meta
- Help optimizing slow WP_Query with meta_query
- meta_value_num not ordering all items
- Meta Queries – should nesting work after WP 4.1?
- Filter and Order by Multiple Custom Meta Values
- Meta Query relation “AND” then set array accordingly
- WordPress | Date not always appear [duplicate]
- Query with meta_query and tax_query together not working properly
- Is_single() conditional tag returns null in query
- Is it possible to query a custom field where the value is between two fields?
- Filter posts by comparing custom meta value against postdate
- Event with multiple dates, display events chronologically
- Create a loop on my pages with new “WP_Query”
- WP ForLoop to compare meta information of posts to determine what post to display
- Problem with get_page_by_path() using with WP_Query
- Get all posts as an array ID => Name
- WP_Query to get post on frontpage
- WP Query / Meta Query [duplicate]
- Search.php – return number of results but cannot loop through
- Creating ‘posts page’ loop based on the page itself
- Query multiple post types, but different order for each
- Combine query in WP_User_Query()
- How can I modify the query by adding to the existing query?
- Custom wp_query inside a conditional stament inside a template part doesn’t work: why?
- WordPress Query custom ordering by temporary variable
- Check the stored / cached WP_Query with transients on post change
- New template file does not load category-specific post
- Comparing Meta Field date in WPQuery using Meta_Query?
- How to create better WP_Query to look for date time which is anywhere between two meta values?
- Query post with content only
- Displaying Pages in Nav Sub-Menu with Specific Taxonomy Terms?
- Global page ID variable empty error
- Multiple meta_query not working
- compare for multiple meta values for same key in wp_query
- datetime picker, timestamps and meta queries
- Why is my query not giving results?
- Continue loop after $queryObject
- Extending WP Query: Custom geolocation meta values work, but tax_query breaks
- Using custom field as ‘orderby’ value causing post grouping by publish date
- WP_Query for attachments without duplicating post_parent and displaying tagged image
- loop through custom post types with meta data
- Looking for a way to exclude frontpage and nav menu from query filter
- Using Query In Post Type Archives
- the_excerpt() not working in custom archive
- Get posts by meta value except one post [closed]
- WP_Query by meta key not returning any posts
- How to get all post_id and meta_value using meta_key in wp_postmeta table
- WP Query – Show custom posts only if user contain some user meta
- How do I subquery with custom meta fields?