in Magento 2.1, I would like to have the Category filter removed from the sidebar when in the shop category page, leaving the price filter untouched.
So far I have tried unsetting the category as anchor, which doesn't change anything. I am able to remove the whole sidebar with XML, but that's not ideal because I want to keep using the price filter.
Best Answer
Override
view.phtml
file in your themeFrom
To
Now set condition for category before
$filter->getItemsCount()
,Final code looks like this