If these products came from WooCommerce, then most probably you’re using wrong taxonomy in your code.
WC products use product_cat taxonomy as categories, so you can’t use built-in categories to filter them.
Use this instead
'product_cat' => 'category-slug-here',
and it should work correctly.
Related Posts:
- How to override admin-bar style
- How to fix a theme with page.php Default Template that accidentally deleted?
- How to change menu icon which is overriden (i.e. by WooCommerce) [closed]
- How to remove howdy dropdown menu content
- How to auto refresh when user change postcode
- How to add custom metakey to shop_order page’s searching function?
- Changing the HTML of notices in WooCommerce [closed]
- WP Enqueue Script Error
- Which template file to edit to edit homepage in Mystile [closed]
- Wp admin – Set default value to 999 in comments
- help I changed one currency in woocommerce and everything is ruined [closed]
- Functions when woocommerce isn’t installed
- wordpress use single ajax in place of multiple ajax requests in a smarter way
- How to override woocommerce.css?
- Add Element as a Filter to the_content
- Remove “Published On” inside wp-admin
- Where do i create my own function in wp-admin
- How to remove comment count column in Posts inside the admin dashboard?
- What is the text that appears beside the page titles in the list of pages in the WP admin?
- How can I use Woocommerce $product->get_attribute in functions.php? (if at all)
- How to change this simple code so that it sends the email notification after payment in WooCommerce?
- I have problems with loading javascripts
- Pass variable from action back to template
- (Woocommerce) Order by price when entering specific category
- Need print logo without any ID & class
- Define PHP variable from a seperate API if statement
- Best way to handle lack of titles in microblogging
- attachment page template? only show attachments for current post?
- Run a jquery script on on a certain template page
- Sortable column (by numbers) in admin users
- Create custom function for hero image
- replace text in Sort Box
- add_filter to specific WooCommerce Category
- Woocommerce checkout field
- Woocommerce image sizes missing from Appearance › Customize but not declared by theme
- add referrer to woo
- error at login page in wordpress
- How to include any template using Shortcode fuction?
- Image loading function not working on archive.php template
- Add a field into a shortcode of an extension
- Way to redirect all Product Sub Category to its Main category Page?
- Add Login/Logout Menu Item to Primary Nav “My Account” Submenu [Woocommerce] [closed]
- Create a Woocommerce product widget with category filter
- Delay a function, any function!
- Specify multiple categories for custom post template – FATAL ERROR
- Update to functions.php not showing in dashboard
- Auto scroll to id on page load on all pages except home page. Only do this on mobile
- Add element to widgetpage
- Using functions.php to include code that’s processed inline
- Best way to disable sidebars on posts (only)?
- How to make a new function that includes a template
- “options.php” not found
- How add body_class from wp_termmeta
- Adding product to WooCommerce cart [closed]
- Change WooCommerce add_to_cart Button Text?
- WooCommerce -> wc_enqueue_js not working [closed]
- Use existing image sizes for WooCommerce
- Show admin page, only if function is being used
- Overwriting TwentyTwelve template file with child theme template, but lower in the hierarchy
- Prevent creating multiple image resizes in twentytwelve template
- How to change a specific admin label
- Simplest Way to Build Custom Archives Page?
- How to change a meta value (of a published post) after X days.?
- Display ACF category image on archive and single template files
- Woocommerce Variable Product Dropdown for Custom Shop Template
- How to hide content on mobile in the functions.php file – woocommerce
- Woocommerce Default sorting product by product type
- How to hide WooCommerce product title and short description to non logged in users?
- Render page with specific id from functions.php
- Block all plug-ins from initiating redirection upon activation?
- How to require a config file in a template and in function.php?
- the_date() and the_time() functions display actual date an time instead of published date and time
- Load templates, pass arguments, and render output from functions.php
- localize_script but data changes dependent on product ID
- Change class woocommerce on function.php
- Show ‘Add to Cart’ on Out of Stock products
- Hide ‘add to cart’ when certain value in dropdown is selected
- removing description tabs – single product page – breaks footer
- Link product attribute value to a URL – woocommerce
- Remove text after a dot and a colon in Woocommerce product title
- When are the user meta fields created in the database? Admin vs Woo API REST
- price of product can’t return when get data of product in functions.php
- Unable to login after registration
- Woocommerce product price change
- Help with with my function for wordpress
- Remove clickable Link of WordPress Site Logo from Woocommerce Single Product page
- is_product_category(‘Services’) not working
- Problems adding a new field to product in cart
- Parent category as WOOCommerce Categories widget title
- Woocommerce Display Discount On cart
- Problem with my footer after changing WooCommerce Products Sorting [closed]
- Insert Modal on user first login
- Variable function names
- Override plugin function to show invoices even if not logged in
- Woocommerce – Switching Price for Category
- how can I change the read more link destinations and direct all to the same page?
- Woocommerce custom calculation function
- button to toggle css styling / div visibility?
- add product thumbnail to checkout page only and include variation name
- Echo a String Based On Geolocation? [Woocommerce || ACF]