Woocommerce +显示仅包含活动类别和子类别的菜单

时间:2023-02-05 10:35:47

I have a menu structure that looks like this:

我有一个看起来像这样的菜单结构:

Categorie 1
- Sub Category
- Sub Category
Categorie 2
- Sub Category
- Sub Category
Categorie 3

分类1 - 子类别 - 子类别分类2 - 子类别 - 子类别分类3

But I only want to show the active category with it's subcategories on the product archive and product detail pages. Like this:
Category 3
- Sub Cat
- Sub Cat

但我只想在产品档案和产品详细信息页面上显示活动类别及其子类别。像这样:第3类 - Sub Cat - Sub Cat

The woocommerce widget shows all the categories and only the subcategories from the active category so I think it's not that hard to fix it but I can't find a solution on the internet

woocommerce小部件显示所有类别,只显示活动类别中的子类别,所以我认为修复它并不难,但我无法在互联网上找到解决方案

(I fixed it by making different custom menu's and an if else function but with products in multiple categories it doesn't work well.)

(我通过制作不同的自定义菜单和if else功能来修复它,但是对于多个类别的产品,它不能很好地工作。)

1 个解决方案

#1


0  

You can use this subcategories plugin: https://github.com/darkdelphin/WooCommerce-Subcategories-widget

你可以使用这个子类别插件:https://github.com/darkdelphin/WooCommerce-Subcategories-widget

#1


0  

You can use this subcategories plugin: https://github.com/darkdelphin/WooCommerce-Subcategories-widget

你可以使用这个子类别插件:https://github.com/darkdelphin/WooCommerce-Subcategories-widget