Reputation: 511
I`m trying to create categories and sub categories for my products . So far it look like this:
-Furniture is a subcategory of Products . On furniture settings i choose Display type to show Subcategories . Like the image :
So my problem now is when i visit Furniture sub category , it shouldnt show all the subcategories of furniture in boxes ? All i get is this :
I want when i visit -Furniture to show all its categories in boxes like the image above . Its only show the Living sub category .
Thank you
Upvotes: 1
Views: 1274
Reputation: 19
Probably you could try this into your function.php
add_filter( 'woocommerce_product_subcategories_hide_empty', 'show_empty_categories', 10, 1 );
function show_empty_categories ( $show_empty ) {
$show_empty = true;
// You can add other logic here too
return $show_empty;
}
also you could checkout following link for more in-depth understanding
Upvotes: 0
Reputation: 511
Ok it seems that if you dont have any products into the subcategories it will not show them . So it seems that why i couldnt see any subcategories when i choose -Furniture and i could only see the Living subcategory .
Thank you
Upvotes: 0
Reputation: 19
You have to change the woocommerce settings . Go to
Woocommerce setting -> Products -> Display ->
Shop page display -> Select Show both
Default Category display -> Select Show both.
I hope it may help you.
Upvotes: 1