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
- WP query taxonomy input differs to output?
- Search custom taxonomy term by name
- Get Recent Posts by Date in Multisite
- How to display post from current Taxonomy in archive page?
- Why is my WP_Query not working when tax_query terms are an array?
- How can I hide posts that are over 2 years old
- Filter and list posts of a custom taxonomy
- WP Query – Get WooCommerce Products with variation that is in stock
- Filter WordPress posts by between parameter
- Use meta_query to display events by date in custom field
- How to Modify Taxonomy Archive Page with Search Parameter?
- How to add terms to my tax_query based off of the current post
- Filtering posts by custom field value not working
- Display link to taxonomy archive only if it has posts with certain custom field values
- How to show recent and upcoming birthdays using meta_query
- Is it possible to dynamically get queried term AND taxonomy?
- WP Query for variable taxonomies
- Pass array of taxonomy terms to wp_query
- Formulate a url to show posts with both taxonomy terms
- WP_Query meta_query >= date
- Taxonomy search/filter with multiple taxonomies and multiple taxonomy terms
- Comparing dates in custom field
- Order by slug in get_terms with multiple taxonomies
- Output an array of terms for a ‘tax_query’ => array()
- Function get_queried_object() return NULL in custom taxonomy
- How to display upcoming events by dat with Modern Events Calendar Lite
- Getting Taxonomy inside WP_Query Loop
- Orderby ASC changes to DESC in WP_Query
- Complex WP_Query (two post types and multiple operators)
- WP_Query Not Recognizing Taxonomy Parameter in Custom Search
- Return Taxonomy/Term Information with Posts (WP_Query/get_posts)
- Remove category from query (show all posts in archive.php) pre_get_posts()
- is_tax() function not working as expected
- Advanced Taxonomy Queries WordPress
- Display Featured Post by Categories and Avoid duplicated posts
- Get authors by term id or slug
- WP_Query tax query part of slug
- Taxonomy Query Relation field not behaving correctly?
- How to Union two different conditions in one WP_Query
- How do I exclude the lowest level terms in a taxonomy?
- Post loop for all taxonomy terms
- Shortcode for latest -not expired- posts
- date_query seems to be ignored by wp_query
- Automatically Query Parent Taxonomy
- WP Group posts by year(desc) > month(desc) > date(asc)
- Taxonomy order exception for specific term
- Using custom taxonomies in a query
- WordPress Custom Search Form Displaying Unexpected Results
- Get posts from multiple tax terms
- Get Child Category only
- Filtering posts by archive showing all years
- Loop posts based on permalink term
- How to echo woocommerce category name
- WP Query – filtering terms with regex
- How to get posts by category and by choosing a taxonomy term?
- Ordering posts by custom field and grouped by month
- Show single posts date, in a page of posts
- relation OR instead of AND – Filtered term ID’s in loop
- 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
- get_the_terms has strange result since version 6.0
- Can’t get term id for category archive
- Exclude post with taxonomy and from the terms (taxonomy & tag) posts count
- Use get_cat_ID to retreive multiple category IDs
- Strange behaviour of hierarchical taxonomy archive
- WP Query should show No Posts when tax_query $args taxonomies don’t have associated posts
- tax_query not working on custom post type
- Save queried result into database
- WooCommerce WP_Query using tax_query returns no results (0 = 1)
- 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
- Show one post of each custom taxonomy
- How to break up output of posts for different terms on same page?
- Custom category page with taxonomy filters
- taxquery taxonomy get terms
- How to define a custom hierarchy for terms?
- Taxonomy Terms That Don’t Exist Display Results
- Custom taxonomy and query multi conditions
- WP Query with sticky posts and tax_query
- Empty ‘terms’ in ‘tax_query’ returns an empty array
- Year based WP Query
- Get the tax term in which is a post via wp_query
- Get post closest to today
- Query custom post type by date field only working when two posts match the query
- Get posts from similar time as current post
- 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
- How can I get taxonomy term name using term slug & post ID using build in WordPress function or class?
- WP_Query sort by ACF date field (newest first) with blank dates first
- Using WP Query, I want to include all posts in category 1 as long as they are not also in category 2
- Filter on one post type with taxonimy and get other post type
- Include custom post type that matches taxonomy field in another custom post type
- Showing all posts of the current custom taxonomy on archive page