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
- Post Query with Meta Query no longer working
- Query posts with “non set” meta value
- WordPress | Date not always appear [duplicate]
- Make meta query treat meta_value as 1 or 0
- Query with meta_query and tax_query together not working properly
- Custom taxonomy.php not working
- How to remove the most recent post from $the_query
- different for loop if screen resolution < 1000px
- Reset WordPress Post Query to default
- WP_Query loop else statement not executing
- Change query from cat id to slug or name?
- How do I get my custom query to work with search results after the first page?
- Using Wp_Query without the loop?
- Is_single() conditional tag returns null in query
- Ordering a mysql style datetime stamp with meta_query
- How do I rewrite this loop as a new WP_Query style-loop?
- Transient api Caches confused
- Issue with front page navigation after upgrading to 3.4
- Include current post into loop
- What happens to the default query when I use WP_Query?
- Custom WP_Query id
- Best choice for multiple loop in page?
- Is it possible to query a custom field where the value is between two fields?
- get_template_part causes 500 error
- WP Query – order posts by meta field first and then order the rest
- Meta Query doesn’t works as espected
- How to Create a Random List of Child Pages
- Filter posts by comparing custom meta value against postdate
- How to display the featured image for each post?
- Assign custom parameter to each post in query
- Adding a html class based on post count
- Advanced WP_Query with meta_query, orderby?
- meta_query: check if number exists
- Check for the main query from the template
- how to use pre_gets_posts to exclude one queried ID from homepage loop
- Custom WP_Query doesn’t display all posts
- Searching for meta_key returns 0 posts
- Trying to retrieve random post, getting a page
- Posts in loop all show the same author when there are many authors
- Exclude recently updated post from custom WP_Query using multiple loops
- get_posts output always same post
- Event with multiple dates, display events chronologically
- Multiple Rows in a using wp_query
- How to use WP_Query() on single.php?
- meta_query fails to compare on values containing apostrophes
- sort and display posts by custom field (wp-query and the loop))
- How can I prevent posts with no title showing up in my query?
- How can I use the WordPress Loop and Pagination in multiple instances but different scenarios throughout my site?
- WP_Query with custom post type ID
- How to create custom query by keyword in post title?
- difference between querying database and using the loop
- meta queries do ‘either/or’ checks
- If have posts a week old, display, else display a different loop
- WP_Query – Adding “offset” posts to the end of the loop
- Stomping WP_Query in author archive to facilitate pagination with custom queries
- How to make posts unqueryable/unpublish posts where ACF relationship field is an unpublished post? [closed]
- Conditional operator OR not working with custom fields
- How to set up hierarchical relationships without using plugins / meta query
- WP Query ordering on a meta field for posts with a date in the future not ordering by datetime
- Loop increase in while loop not working
- Create a loop on my pages with new “WP_Query”
- Is this meta query problematic?
- Get posts that do not have the same tags as current
- posts archive page – closing WP_Query loop correctly [closed]
- WP Query Meta Value – How To Identify Specific, Unique Values?
- Selecting posts with a given meta value for a meta key
- Create a page template for “top rated posts” but show full content and not just a list
- has_excerpt() not working inside wp_query
- Order by meta_key doesn’t work
- wp_query is showing posts from other categories
- Daily drip of posts – based on user ‘startData’ – ordered oldest to newest
- How to add tax_query to $args with concatenation
- Should I reset $wp_query?
- Check if searched number is within the post meta value