I am working on a Magento 2.1.7 shop.
The products are organized into categories and subcategories.
Whenever a customer visits a category, filters (links to its subcategories) are displayed. I want to disable the filters.
The path to the file responsible with the filters is
vendor/magento/module-catalog/view/frontend/templates/navigation/left.phtml
I want to overwrite it from app/design/frontend/myCompany/myTheme/
.
- How do I disable filters by coding?
- Can the filters be disabled from Magento admin?
Best Answer
In your theme directory create ( if the file is not existing already )
Magento_Catalog/layout/catalog_category_view.xml
and remove the block by adding the following line<referenceBlock name="catalog.leftnav" remove="true" />
do not forget to add the xml needed nodes. Your code should look something like the below example.