You are missing quotes around category
as the taxonomy in your query:
'taxonomy' => category,
Needs to be
'taxonomy' => 'category',
So the taxonomy query looks this
'tax_query' => array(
array(
'taxonomy' => 'category',
'terms' => 14
)
),
Related Posts:
- Use REGEXP in WP_Query meta_query key
- Why is the loop not empty on some 404s?
- Multiple custom fields for ‘orderby’ in ‘WP_Query’
- How to order by post_status?
- How to paginate wordpress [gallery] shortcode?
- wp_query->max_num_pages always returns 0 on custom post type
- get_template_part in for loop
- How to display post from current Taxonomy in archive page?
- Display recent posts from the same category as current post in sidebar
- Load more AJAX on WP Query
- Using is_main_query to select custom post type on certain page
- WP_Query ordered by custom field that is a date string?
- WP_Query not working as expected for attachments and custom meta_query
- How to count post type that has a particular term?
- Group posts by meta_key
- How to Get All Posts but the Private ones?
- How can I hide posts that are over 2 years old
- WordPress custom search form with pre_get_posts not work
- Custom URl parameter
- order by multiple meta keys in pre_get_posts
- Order By Multiple Meta Fields
- WordPress: Keep order of query_posts list of post ID’s using post__in
- Advanced WP Query hogs the SQL server
- How to get user_id from wordpress database inside ajax function?
- How to combine meta_query and post__in in WP_Query
- Is it faster to query records using $wpdb instead of Wp_Query?
- Display posts if specific country
- query user display_name failed in a custom mysql query foreach
- Meta box dropdown of custom posts
- Query with custom taxonomy not working
- Query posts by specific word on title
- Date and Category query with filter
- Get posts for which a custom field is not present, with get_posts
- Output an array of terms for a ‘tax_query’ => array()
- add active class based on permalink and url
- Search by post id in a specific page then auto-redirect to searched post
- Pretty urls for custom pagination
- WP_Query with ‘rand’, but equal number of posts from the taxonomy terms given
- querying data via $wpdb and get_row
- Combining categories (Query posts with multiple taxonomy terms)
- wp_update_post not working
- slow query – Search for Media Gallery
- WordPress has a list of reserved words, can I override them, to use one in a query string?
- WP_Query arguments order
- meta_query: check if number exists
- How to order WP_Query to group results?
- new WP_Query messes up pagination
- Search Page Returns Nothing
- WP Query causing timeout
- get term id from term name
- Query where ANDing slug values not working
- Woo Commerce using WP_Query to get products that match price range, with an additional required product attribute
- Woocommerce: order posts by meta key
- Modify query posts
- WP_Query with multiple orderby NOT working with ASC and DESC, what’s wrong?
- query post by author gender
- Display all attached image of every post of custom post type and link to original post
- How do I add an item to the WP admin menu?
- Multiple meta query from array
- Find only those galleries with images
- WQ Query post meta date comparison
- Filter subpages in while loop from WP Query object
- How to search by slug and old slug in single API
- Reciving Error 404 blog/page/2/
- WP Query Order By Multiple Values
- Error: Attempt to read property “ID” on null
- Unrelated post showing in WP_Query
- Custom meta_query order for Elementor based on post meta key [closed]
- wordpress pagination wont render on custom page template even though its right under the loop like the documentation says so
- Multiple meta_query not returning rows
- show related articles in single.php template
- Order by meta date with a thousanth of a second defaults to post order
- How to debug none working search query?
- Order by Date Custom Field
- WP_Query showing all posts, except from category X, unless it’s also in Y
- How to query search only for post titles?
- Shortcode attributes causes 500 error after updating the page
- Show posts by category – category ID not working
- WP_Query to Retrieve Posts from WooCommerce Products that are Only in Catalog
- Show All with Isotope
- Search Filter With Custom Taxonomy and Custom Fields : How do I handle it via plugin?
- query_posts based on a meta_key
- wp_get_attachment_image not to get the post_thumbnaill
- Query with two posttypes and two different meta_keys
- Sort by meta key within same day
- Duplicates When using Nested WP_Query
- meta_query not working with the_content()
- WP_Query to show post from a category OR custom field – Not 100% answered
- Show portfolio items in template – how?
- Pagination in custom query in a category page
- WordPress WP_Query Array Custom search via taxonomies
- Problem with WordPress 4.0 and $wp_query
- Add category and user name to recently updated post list
- Pagination in WP query with transient API
- WP Paginate not working properly
- How to get child pages and add unique class only to active page?
- Main loop querying current template’s info only in custom category archive pages, not my posts
- How can I display sticky posts at first in wp_query?
- Use meta query only 3 or more results?
- How to prevent WP query searching in executed shortcodes