Take a closer look at the date parameters; you’ll need to enter an integer (number), not a string (text). Simply get rid of the single quotes to make it work:
$args = array(
'post_type' => 'job',
'tax_query' => array(
array(
'taxonomy' => 'location',
'terms' => 'dallas',
'field' => 'slug'
)
),
'date_query' => array(
array(
'year' => 2014,
'month' => 12
),
)
);
$jobs = new WP_Query($args);
Related Posts:
- WP_Query orderby date not working
- Search custom taxonomy term by name
- How to display post from current Taxonomy in archive page?
- Display posts the match taxonomy term linked from wp_list_categoies?
- WordPress Custom Query to show posts from last x years
- Why is my WP_Query not working when tax_query terms are an array?
- Move posts to top of WP_Query if in certain Taxonomy?
- Querying Multiple Custom Taxonomy Terms
- How can I hide posts that are over 2 years old
- WP Query – Get WooCommerce Products with variation that is in stock
- Date query not inclusive despite parameter being true
- How to Modify Taxonomy Archive Page with Search Parameter?
- Ordering by meta_value AND date NOT WORKING with wp_query
- How to add terms to my tax_query based off of the current post
- Filtering posts by custom field value not working
- Order taxonomy terms in alphabetical order
- WP Query for variable taxonomies
- Meta Query for specific months
- How do I search inside specific taxonomies in WordPress
- Pass array of taxonomy terms to wp_query
- Formulate a url to show posts with both taxonomy terms
- Complex date range with WP_Query and BETWEEN
- Taxonomy search/filter with multiple taxonomies and multiple taxonomy terms
- Comparing dates in custom field
- Output an array of terms for a ‘tax_query’ => array()
- How to display upcoming events by dat with Modern Events Calendar Lite
- Getting Taxonomy inside WP_Query Loop
- WP_Query Not Recognizing Taxonomy Parameter in Custom Search
- Return Taxonomy/Term Information with Posts (WP_Query/get_posts)
- Complex WP_Query order request: DESC by day, but then ASC by time
- Advanced Taxonomy Queries WordPress
- Display Featured Post by Categories and Avoid duplicated posts
- Get authors by term id or slug
- WP_Query: Group events by year, sorted DESC; then by date for each year group, sorted ASC
- WP Query Args – Title or Taxonomy Value
- Slow queries on a huge database
- How do I exclude the lowest level terms in a taxonomy?
- Search Query for multiple categories using ‘OR’ but having certain categories be ‘AND’
- wp_query args adding muitiple tax_querys
- Shortcode for latest -not expired- posts
- Automatically Query Parent Taxonomy
- How Can I Change The Tax Query For The Main Loop For Taxonomy Archives?
- Taxonomy order exception for specific term
- Custom taxonomy.php not working
- Display Current Post’s Position in Custom Taxonomy
- WP_Query for a taxonomy with different taxonomy types
- WordPress Custom Search Form Displaying Unexpected Results
- Get posts from multiple tax terms
- How to Order a list of taxonomies? orderby?
- How to add custom meta to ‘pre_get_terms’?
- Get Child Category only
- WP Job Manager plugin – Listing only the twelve job categories on frontpage order by jobs they have
- Get posts in taxonomy randomly
- Loop posts based on permalink term
- How to get posts by category and by choosing a taxonomy term?
- Limit loop to future events
- How to show list of posts with custom field value (a date) that are coming soon
- Don’t repeat posts from children in parent taxonomy query
- Added Date Filter To Popular Posts Query
- Show multiple tax_query from 2 or more post_type in a single code
- Custom taxonomy in WP_Query not working
- get_the_terms has strange result since version 6.0
- Can’t get term id for category archive
- How to make a post with certain taxonomy term display first before other post with only one query?
- Use get_cat_ID to retreive multiple category IDs
- Strange behaviour of hierarchical taxonomy archive
- How can I order a post query’s results based on the number of matching taxonomy terms?
- WP Query should show No Posts when tax_query $args taxonomies don’t have associated posts
- Only show tag with the same id as the post
- How to use the Term Object from a custom select field in a query
- wp_query with meta_query and tax_query
- Comparing Meta Field date in WPQuery using Meta_Query?
- WP_Query paginate with one term per page?
- WordPress – Form does not filter the results of taxonomies
- How to get only present and past posts with post_date
- WP Query for all events prior to current date
- Show one post of each custom taxonomy
- Problem with my loops
- Sort posts on custom field AND after that sort on date?
- How to break up output of posts for different terms on same page?
- Taxonomy archive, categorised by other taxonomy, not hiding empty taxonomies
- taxquery taxonomy get terms
- pages shortcode filtering by category
- How to show terms from another taxonomy
- How to define a custom hierarchy for terms?
- Get posts by birthday
- Taxonomy Terms That Don’t Exist Display Results
- Category Archive not working for pages
- How can I get all the posts that are related with a specific taxonomy term?
- WP Query with sticky posts and tax_query
- Search format not matching taxonomy query
- Year based WP Query
- Query custom post type by date field only working when two posts match the query
- Divide WP_Query posts by date & post type
- Query Posts by date range with fixed beginning and end
- Issue with sorting by post date and custom post type
- Multiple Orderby is not working right
- tax_query not working properly with get_posts
- Get posts that were most recently tagged
- How can I get taxonomy term name using term slug & post ID using build in WordPress function or class?