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?
- How to use meta_query to retrieve posts from multiple custom post type
- Resetting post data to previous loop in nested loops
- Pagination returns 404 after page 20
- Make loop display posts by alphabetical order
- get custom post type by tag
- Does tax_query really beats meta_query in all situations?
- Execute a large WP_Query with many “AND” Meta_Queries?
- Group posts by custom field
- Finding all results from database within 500 miles of the given latitude and longitude [closed]
- get_posts() seemingly ignoring post_type
- Woocommerce custom loop to show all the products [closed]
- How to show the posts of some category first, and then all other
- Pagination stops at page 6
- Paginated HTML Sitemap
- Meta query field order together with post_date order causes posts without the meta field to be unordered
- pre_get_posts filter meta_query without conflicting existing meta_query
- How to limit total number of posts in wp query loop?
- Undefined property: WP_Query::$post
- Programmatically set ‘meta_query’ for filter
- WP_Query meta_query >= date
- Extending woocommerce admin product search
- Pagination is broken and I need help fixing it
- How to vary post loop results layout and resume?
- Adding an array from a query string to a WP meta_query
- Get a post from other loop each n-posts in the main loop
- Loop returning only 1 result
- Query by multiple meta elements not seeming to work – wordpress is timing out
- WordPress Loop and $post
- How can I use $wp_query->tax_query as tax_query parameter for a new WP_Query instatiation?
- How does one perform a sub query with different post types
- Some doubts about how the main query and the custom query works in this custom theme?
- Post loop for all taxonomy terms
- Stuck in the query loop
- 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
- WordPress extremely slow when using get_posts with multiple meta_query relations
- Use value from meta key array for use in WP_Query