That worked great!
Just added this:
'meta_query' => array(
array(
'key' => '_stock_status',
'value' => 'instock',
'compare' => '=',
)
)
Thanks!
Related Posts:
- Cluster WooCommerce products in each Category Archive by Tags assigned to products
- WP_Query Taxonomy categories filtering
- Hide products in uncategorized category from search results
- How to echo woocommerce category name
- What code to use in an array to call the current sub-category?
- Get categories within specific term
- Exclude or Include category ids in WP_Query
- WP_Query: Exclude hidden products from WooCommerce product list
- WP_Query to show post from a category OR custom field
- get_posts with multiple categories
- Query WooCommerce orders where meta data does not exist
- WP_Query for WooCommerce Products
- ajax category filter
- Display recent posts from the same category as current post in sidebar
- Changing a theme’s search function to only show results from woocommerce?
- Get WooCommerce best selling products for the current month [closed]
- How to filter by category in REST API, excluding posts also in other category term?
- retrieve thumbnail from post ID of best selling product in category
- Counting number of posts with Category B in Category A
- Woocommerce query by price range and custom meta key
- How to order category.php loop by ‘meta_value’?
- Use Transient API to cache queries for all posts in all categories?
- How can I display recent posts from a particular category in my header?
- Sorting Posts by custom field
- WooCommerce: filter by parent product’s taxonomy and product variation’s meta data
- Retrieve products with specific attribute and in category – woocommerce
- How to combine tax_query and date_query in WordPress
- how to retrieve specific product attribute value in an sql query?
- Find all product that contain terms with %keywords% in WP_Query
- Display featured products through custom loop in WooCommerce 3 [closed]
- WP Query with multiple categories – passing an array works?
- WP Query – Get WooCommerce Products with variation that is in stock
- wp_query display posts from same category of the post
- How to show only one post for each categories of taxonomy of custom post that contains a specific custom field
- WP_query category__in not working, only pulls from first category
- WP_Query order by date in meta_value
- How get posts from a subcategory of a category by name?
- Search product by brand name in wp_query
- get complex results set according to category structure
- Get product list of given category
- Searching through different categories on different pages code is not working
- How to exclude products by tag from woocommerce shop page?
- Get image of latest post from taxonomies/categories
- How To Remove/hide some specific categories from two different categories widget from sidebar
- How to select posts from one category but exclude posts in another category?
- WooCommerce Only OnSale Products Loop Snippet [closed]
- Get Category Archive Template Name Dynamically
- WP_Query arguments to fetch custom post type posts which are in certain category?
- How do I reset this wp_list_categories query?
- How can you get first post, last post and post count in a category?
- How to get the WC_Product Object when using a WP_Query in WooCommerce
- How to get count of posts assigned to given category?
- Extending woocommerce admin product search
- merge two query arguments into one WP_Query call
- How to show subcategories using loop?
- Woocommerce returns Product post_status as published even tho it is in status draft
- List of the years with posts presented
- Remove a specific category ID from related post
- WC displaying products from category
- Complex Category selection as per user input
- Show all post for a given category
- showing all search result in one template
- Five posts from a category in footer
- Get all products which have both product category
- How to get all unique categories for posts in loop?
- Woocommerce query all products and categories
- Take all produts by category
- Sort by price woocommerce by ID post_meta
- Display Featured Post by Categories and Avoid duplicated posts
- How to get all product attributes for filters in WooCommerce?
- Category applied to pages, creates multiple breadcrumb entries after a search query (On the translated site)
- WP_QUERY to display woocommerce products whose author IS the logged in user
- category query for pages not working
- Can we return all category (not post) with Custom Query Filter? [closed]
- Extend product search with meta in WooCommerce
- WooCommerce – get product sub categories
- Query posts intersecting tags and categories
- Having trouble with WooCommerce Storefront child theme single.php “related posts” modification [closed]
- Query posts from category A, and from either category B or C
- Search Query for multiple categories using ‘OR’ but having certain categories be ‘AND’
- Woocommerce – Changing the order of the upsell products [closed]
- Out Of memory issue on post per page parameter
- Combining categories (Query posts with multiple taxonomy terms)
- Check if loop has any categories?
- Filtering out child category posts from parent category archive not working
- Exclude Category filter from Portfolio section
- Inserting HTML to close and open divs in WP_Query loops
- Redirect to another page using contact form 7? [closed]
- Limiting number of related posts
- Category ‘pad_counts’ & ‘parent’ conflict
- wp_query not working with post_type
- Woocommerce – exclude only older out-of-stock items
- Need Sub-category with main Category
- Woocommerce pagination and result count after custom loop
- How to query woocommerce product by pricing? [closed]
- Finding WordPress Posts assigned to multiple categories
- Include posts from some categories while excluding from others
- Combine results of multiple WP_Query to resemble single WP_Query
- How to order WP_Query to group results?
- WordPress Custom Search Form Displaying Unexpected Results