Hide product categories and taxonomy terms in menu if empty
Question
I’ve been researching this and had no luck so far.
I have a WooCommerce store with a main menu showing product categories (product_cat) and brands (yith_product_brand) which is a custom taxonomy.
I want to hide categories and brands if they are empty. Do you know a way to achieve this, either by using a plugin or adding a function/filter to the functions.php file? If so any help would be much appreciated.
Thanks in advance.
0
custom-taxonomy, menus, sub-menu, taxonomy, woocommerce
3 years
2019-11-01T06:28:29-05:00
2019-11-01T06:28:29-05:00 0 Answers
84 views
0
Leave an answer