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
- Targeting Parent Category Pages
- Create category post shortcode
- Wacky taxonomy in wordpress
- get_terms function not returning anything
- Display custom taxonomy attached to the post on post single page
- Shortcode interpreted as text
- Categories are not listing their respective products
- Display single category name in woocommerce loop
- How to display parents category and child category separately for a specific post?
- Building Menu from Woocommerce Product Categories
- woocommerce related products by specific categories [closed]
- Question on using custom structures for categories
- Admin: Navigation Menus do not show empty categories/taxonomies in the list’s search tab
- Notice: Trying to get property of non-object in : custom fields category
- Category archive is displaying all posts rather than the specific category
- How to Remove a Title from All Category and Tags Page?
- Display sibling categories on category page
- How to modify the output of wp_terms_checklist when used within the built-in category metabox on edit posts?
- Get Posts by Category, Tag , and CPT Taxonomy
- WP REST API not retrieving all categories
- How to display a value inside a post with a specified category from a category custom field? [closed]
- Some categories missing on wp-admin/edit-tags.php?taxonomy=category
- Echo text using is_tag
- About title on a page
- List a maximum of ‘x’ product categories with qty of ‘y’ in each column
- Display all product tags associated with a specific product category
- get_posts() from parent category only using a shortcode
- I want to show category name when using [category] shortcode
- related articles using shortcodes
- How to access deleted term inside delete_product_cat action
- Apply WordPress function on specific woocommerce product categories only
- Filter WooCommerce archive pages by an additional category
- How to echo woocommerce category name
- Portfolio Filter Buttons Wont Work
- Eliminate word from $term->name
- What Must to Display the “mysite.com/category” URL?
- Custom tax_query filter not working for Woocommerce product categories
- How do order product categories – on a parent category page – in Woocommerce?
- WP 4.7 in_category change?
- display category list year wise in wordpress
- Woocommerce filter function not updating
- Adding custom ID field to the categories
- How can i change what one category displays?
- Remove any product that is featured from regular display loop [WooCommerce]
- Two Sections on Woocommerce Catergory Page [closed]
- Woocommerce search form with category select
- How to choose the content from a post which is in the right category?
- Get posts of a custom post type from category from taxonomy?
- How to display product with two condition, category and brand taxonomy
- Show different menu on each woocommerce category page
- Illegal string offset ‘taxonomy’ in
- Style a category from category list
- How to display post in custom file not in archive file?
- Same menu for different taxonomies to reach different content
- Change categories count to include media attachments
- How to schedule categories?
- Template for product-category page [closed]
- How to get selected taxonomy or category ID if using custom walker?
- WordPress showing wrong category name
- Media (images, videos, etc.) not showing on Category page
- WordPress monthly archive category specific
- Problem with multiple loops in wordpress theme
- Let user select their own category
- Displaying year once in category.php [duplicate]
- what file I need to create to work date archive links?
- Archive filtering
- Copy post taxonomy?
- Show Secondary Sidebar on Category pages (archive)
- How could I write a get_categories_by_year() function?
- Rebuilding a Site: How to Show Several Category Posts in Woo Framework Theme?
- Get posts in a subcategory of a chosen parent
- Displaying a custom field in Category Archives
- Add multiple orderby with pre get posts
- Setting selected term_id with wp_dropdown_categories?
- creating categories programmatically
- Natural sort / ordering wp_dropdown_categories
- Shortcode to display all the post from a category in a page
- How to get posts using category slug in ClassiPress?