How to Remove Layered Navigation from Category Page in Magento 2

Layered Navigation in Magento 2 is one of the useful features that lets your customers search items easily and quickly based on category, price, and product attributes.

It generally appears in the left column of Magento 2 category pages and the search results pages. Layered navigation enhances the on-site experience for your customers.

Admin generally needs to perform various operations and customizations on layered navigation based on business requirements, such as removing filterable attribute values with 0 products from Magento 2 layered navigation or altogether remove layered navigation from category page in Magento 2 based on the design or theme of the store.

For example, if you have products for which category-based classification does not matter or when the landing page is more critical than the category page, removing the layered navigation can be considered.

If you are offering software products such as Magento 2 extensions, or any related services that don’t need category-wise searching, the below solution can be useful.

It is better to remove layered navigation instead of distracting users and adversely affecting the user experience in such situations.

Follow the below method to remove layered navigation based on the design layout requirement:

Method to Remove Layered Navigation from Category Page in Magento 2

Use the below code in catalog_category_view.xml at app\design\frontend\[theme]\Magento_Catalog\layout

<?xml version="1.0"?>

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="catalog.leftnav" remove="true"/>
    </body>
</page>

That’s all!

You can also remove specific attributes from the layered navigation in Magento 2. Refer to our blog post on How to Add or Remove Price Filter in Layered Navigation in Magento 2.

Feel free to share the solution with Magento Community via social media.

Thank You.

Jignesh Parmar

Article by

Jignesh Parmar

An expert in his field, Jignesh is the team leader at Meetanshi and a certified Magento developer. His passion for Magento has inspired others in the team too. Apart from work, he is a cricket lover.