This topic has 3 replies, 3 voices, and was last updated 3 minutes ago ago by Andrew Mitchell
hello,
I have a lot of subcategories in my shop, I want hide subcategories from the Sidebar filter
can you help please?
yoomart.co.uk
Hi @woomart,
There is no hooks to change this so we’ve edited this file: /wp-content/plugins/et-core-plugin/app/models/widgets/categories-filter.php around 124-129 lines.
– From:
$categories = get_terms(array(
'taxonomy' => 'product_cat',
'hide_empty' => $hide_empty,
'operator' => 'IN',
'include_children' => false,
));
– To:
$categories = get_terms(array(
'taxonomy' => 'product_cat',
'hide_empty' => $hide_empty,
'operator' => 'IN',
'include_children' => false,
'parent' => 0,
));
Now the parent categories will show only. Could you please double check again?
Thank you!
Dear woomart,
We hope you’re reveling in the experience our theme brings! Your enthusiasm is what fuels our passion. Would you be so kind as to channel that energy into a 5-star rating on ThemeForest? Your feedback is the spark that lights our way!
Click here to spread the love: https://themeforest.net/downloads
Thank you for being an integral part of our journey!
Best Regards,
The 8Theme Team
The issue related to '‘How to hide subcategory from ( Sidebar filter ) in Shop Page’' has been successfully resolved, and the topic is now closed for further responses