This topic has 3 replies, 2 voices, and was last updated 6 years, 9 months ago ago by Olga Barlow
Hi there.
So i’m finishing configuring my website, and there is one missing spot.
On some category pages, there are some categories missing, here’s an example on the following two images:
https://i.gyazo.com/8551f072ef84912881346232f8889b35.png
This is the list of the categories inside the category “Instrumentos de Sopros” on frontend
https://i.gyazo.com/4566acee3913a3326ed1b7ef97ec11d4.png
This is the list of the categories (some) that are inside of “Instrumentos de Sopros” on backend.
Notice that “Fliscorne” and “oboés”, that are the second level of the categories, are not showing up on the frontpage, even though that they have categories (I know that “Sousafone” doesn’t appear because it has 0 products).
Any clue of what might be the problem?
Thanks and good work
Well, founded the solution:
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;
}
Sugestion: Add this option on the Theme options 🙂
Thanks,
Hello,
This is WooCommerce plugin functionality and plugin hides empty categories by default. So if you want to show them then yes, you may use additional custom code or third-party plugin.
I’ll pass your suggestion to our developers but can’t promise that we’ll add this option because it’s related to WC plugin more than to custom theme.
Regards
You must be logged in to reply to this topic.Log in/Sign up