Show all (sub)categories in block editor
-
Wordpress: 5.6.2
WooCommerce: 5.0.0I have a site with a lot of categories and subcategories. Up to 3 levels of subcategories. Its working well, but I want to have some pages that displays only content from certain subcategories.
Using the block-editor, I’m able to add a block and show only products from specified categories, however, I want to add empty categories to this selection as well. They might be empty now, but I will add products later. When I search for categories in the right hand panel, only categories with products are displayed.
More specific, my categories are:
Type of clothing A
– Sizes from xx to xx
— Size xx
Type of clothing B
– Sizes from xx to xx
— Size xxI want to add a page that only displays items from all “Size xx” subcategories.
Is there any way to make all (sub)categories avalable for selection in the block editor, including empty ones?
I’ve tried to add this snipped without help:
add_filter( 'woocommerce_product_subcategories_hide_empty', '__return_false' );
The page I need help with: [log in to see the link]
- The topic ‘Show all (sub)categories in block editor’ is closed to new replies.