This topic has 6 replies, 2 voices, and was last updated 5 years, 10 months ago ago by Rose Tyler
Hi, is it possible to show the sub categories when viewing the category, I can only currently get them to show if there is a product that is ticked into that sub category
However I need to show them even if there is no products in there, I have all the settings set to show both sub category and products but the sub categories aren’t showing
Hello,
You need to unselect “Hide empty categories” in settings of Categories widget http://prntscr.com/me3kgc
If this is not what you are looking for, provide your site and temporary wp-admin access, so I can take a closer look.
Regards
Didn’t once mention widgets, please read the ticket again
I just need the sub categories to be shown, even if there are no products in them, it works on other themes it’s just this theme that seems to not show a sub category if there is no product in there
Dear,
Our theme inherits the functionality of WooCommerce.
Storefront – http://prntscr.com/me5fq8 http://prntscr.com/me5g0m and our theme – http://prntscr.com/me5gfc
If you are looking for this result – http://prntscr.com/me5grb , add this code in functions.php of child theme:
add_filter( 'woocommerce_product_subcategories_hide_empty', 'hide_empty_categories', 10, 1 );
function hide_empty_categories ( $hide_empty ) {
$hide_empty = FALSE;
// You can add other logic here too
return $hide_empty;
}
Regards
Perfect thank you, worked!
You’re welcome!
Regards
You must be logged in to reply to this topic.Log in/Sign up