The Shortcode to display products in “Fruits” category when user is on another page or archive… is:
[products category="fruits"]
As far as I know there is no shortcode to display the parent category products without specifying the given category slug.
For your 2nd example you will have to call it in your sub category “Pork”
[products category="meat"]
and so on for each category.
You can find WooCommerce shortcodes here:
https://docs.woocommerce.com/document/woocommerce-shortcodes/
Related Posts:
- get_categories for custom post type with a specific custom taxonomy attached
- How to create tabled index of posts in a certain category
- Display “add to cart” button on every listing in product category page?
- Omit specific product categories from WooCommerce shortcode
- Shortcodes not working in category or tag description
- Get parrent category name
- Customize category page for different custom taxonomies
- Redirect to another page using contact form 7? [closed]
- Include WooCommerce product to all child categories
- Do not show sub categories in the loop on archive-product.php
- List just subcategory and products of active category page in Woocommerce
- why get_the_post_thumbnail( the_ID()) echos extra post id
- Grandchild Term Things Grandfather Term is It’s Parent
- How to set acf color field as background color to product category
- How to target all woocommerce categories that don’t have any subcategories in them?
- How can I display all products from all categories on one page with woocommerce?
- Get WooCommerce product category list in functions.php
- in post content shortcode works, but hardcoded in same page template doesn’t?
- How to get related category/categories in WordPress archive page
- Sorting Woocommerce products by category and attributes
- Woocommerce custom taxonomy order
- Add custom fields to Woocommerce Category Page
- Retrieve Product category ‘NAME’ by product category ID – WooCommerce?
- How To Modify The Loop in archives.php To Have 11 Posts Per Page and CSS Styling
- Could not insert term into the database
- What’s the URL for a category archive?
- Weird behaviour when adding terms/term_taxonomies programmatically
- Root level category, tag, author and archive pages to work
- Use get_term_children to get the sub category of a parent category for the current post
- Are Custom Taxonomy Templates Possible?
- Remove word “Category” from WooCommerce product page [closed]
- Filtering search results
- WooCommerce change category url and product base
- Remove Archive Headline and Archive Intro Text fields on category and tag archive pages in WordPress Admin with Genesis framework
- Using widget logic I want to show only a widget on the archive page if there are no posts
- What’s the difference between “parent” and “category_parent” in a WP_Term object?
- Output link to category from WP_Query loop of woocommerce products
- Creating archive pages for children categories
- Display name of the last child category
- How to get product count with respect to categories in WooComerce
- conditional for sub category on archive page
- How to view WordPress’ default category IDs?
- Random taxonomy category list
- Linking products to categories
- Warning: sizeof (): Parameter must be an array or an object that implements Countable, On products pages
- Multiple Domain Names – One WP Install (non-Multisite) – Default Each Domain name to Product Category WooCommerce
- Hide woocommerce category name from specific pages
- How can I define a custom archive for childs of a specific category?
- Create archive page for woocommerce attribute
- Woocommerce custom category page with pagination [closed]
- Display custom taxonomy attached to the post on post single page
- Admin: Navigation Menus do not show empty categories/taxonomies in the list’s search tab
- How to Remove a Title from All Category and Tags Page?
- Display sibling categories on category page
- Get Posts by Category, Tag , and CPT Taxonomy
- Echo text using is_tag
- related articles using shortcodes
- How to echo woocommerce category name
- Portfolio Filter Buttons Wont Work
- Woocommerce filter function not updating
- Two Sections on Woocommerce Catergory Page [closed]
- Woocommerce search form with category select
- Get posts of a custom post type from category from taxonomy?
- Change categories count to include media attachments
- How to get selected taxonomy or category ID if using custom walker?
- WordPress monthly archive category specific
- Let user select their own category
- Archive filtering
- Rebuilding a Site: How to Show Several Category Posts in Woo Framework Theme?
- Add multiple orderby with pre get posts
- Displaying posts of given category
- WooCommerce shared categories
- Displaying Single Product Page Parent and Child Category
- Show subChild categories
- Return all Tags and Categories in Separate List
- WordPress 5.4 and higher: Filter posts by category 1 AND category 2 in API requests
- How to show given products only using product id array from specific category page in woocommerce
- WooCommerce REST API not returning the default products category
- Is there a reason to put a product in both the Child and Parent Categories?
- WooCommerce showing active product categories on single product page
- outputting taxonomy hierarchy
- Make category archives page in menu non-clickable
- Confused about category.php template – not working
- No results found for second level category
- How to get get_categories()’s ‘hide_empty’ argument to work with global year var in the archive template?
- How to Manage and link certain custom taxonomy?
- Display Taxonomies in loop with template args
- Create monthly archive for parent category
- Conditional statements based on custom meta value in category archives
- woocommerce – products by category slug? [closed]
- How can I add a Categories page link to a menu? [closed]
- Display only the latest post
- get IDs from links categories
- Multiple Parent Category URLs
- Chained drop-down menu for custom taxonomy using chained.js
- Converting Categories (with ACF fields) to custom taxonomies
- Woocommerce Force the category choice before creating new product? [duplicate]
- Taxonomy term RestApi data 10 rows limitions
- Function to reference post meta in place of category Woocommerce
- hide_empty property not working when using get_terms