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?
- 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
- Filter and list posts of a custom taxonomy
- WP Query – Get WooCommerce Products with variation that is in stock
- Date query not inclusive despite parameter being true
- 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?
- 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
- 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
- Order taxonomy terms in alphabetical order
- Is it possible to dynamically get queried term AND taxonomy?
- 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
- WP_Query meta_query >= date
- Complex date range with WP_Query and BETWEEN
- 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)
- Complex WP_Query order request: DESC by day, but then ASC by time
- Remove category from query (show all posts in archive.php) pre_get_posts()
- is_tax() function not working as expected
- 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
- tax_query not working on custom post type
- Save queried result into database
- How to use the Term Object from a custom select field in a query
- WooCommerce WP_Query using tax_query returns no results (0 = 1)
- 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?
- Custom category page with taxonomy filters
- 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?
- Custom taxonomy and query multi conditions
- WP Query with sticky posts and tax_query
- Empty ‘terms’ in ‘tax_query’ returns an empty array
- Search format not matching taxonomy query
- 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
- Get posts that were most recently tagged
- Custom query for certain post type OR another post type with a certain category
- 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
- How to display only posts from the last day with posts published?
- WP_Query filtering in ACF field containing dates
- Loop a Single Taxonomy and Output all Posts Associated (but also show a message for empty ones)
- Query top level custom post in taxonomy
- Include custom post type that matches taxonomy field in another custom post type
- Showing all posts of the current custom taxonomy on archive page
- Need help with Query Loop. Need to get current taxonomy term and its posts and group them by a different selected taxonomy term
- Custom tag template to list posts in ASC order