0

In Magento2.4.x how to hide categories from left side layered navigation on search result page only. Is there any setting/configuration or will have to do through code There is a configuration here Store -> Configuration -> Catalog -> Catalog But not specific to the search result page

enter image description here

0

you can override this file

vendor/magento/module-catalog-search/view/frontend/layout/catalogsearch_result_index.xml

app/design/frontend/Vendor/Theme/Magento_CatalogSearch/layout/catalogsearch_result_index.xml

and add this code

<referenceContainer name="sidebar.main" remove="true" />
<referenceBlock name="catalogsearch.leftnav" remove="true" />
<referenceContainer name="sidebar.additional" remove="true" />
1
  • This will remove the whole left sidebar, I want to remove the categories filter only.
    – ishaq
    Sep 10 at 12:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.