Magento 2 remove layered navigation
In this tutorial we will learn about a method in magento 2,Magento 2 remove layered navigation.Before starting the example i suppose you are familiar with magento 2 and are an advanced learner. If you are a beginner please start from the beginning.
Lets come to our topic.
Removing all categories
If you want to remove all the categories then add this code in your default.xml and add this to your theme or module.
default.xml
<referenceBlock name="catalog.leftnav" remove="true" />
Removing single category
Furthermore if you want to do this for single category you can do that from admin panel.For that,login to admin panel and then go to
Admin Panel > Products > Categories > YOUR PAGE > Design
and add the following xml.
<referenceContainer name="catalog.leftnav" remove="true" />
That’s it from this tutorial. I hope it has help you in learning.
2 thoughts on “Magento 2 remove layered navigation”
Leave a Reply
You must be logged in to post a comment.
Really Helpful found others solutions on your blog that work like charm.. thanks for starting this blog looking forward more helpful stuff here.
Hello
Your solution is good and removes layered navigation but paging and sorting functionality not working for category list page.