I want to show Layered Navigation on Home Page.

On home page their is banner slider and on banner image their is Search Box like below.

enter image description here

Now I want show Layered Navigation instead of that search box.

And I can remove that search box but Don't know

How to show Layered Navigation on Home Page?


1 Answer 1


To show layered navigation on home page do following->

Edit CMS homepage, inside it in design tab -> layout -> selected "2 columns with left bar". Then added following code in design-> Layout Update XML

<referenceContainer name="sidebar.main">
        <block class="Magento\LayeredNavigation\Block\Navigation\Category" name="catalog.leftnav" before="-" template="layer/view.phtml">
            <block class="Magento\LayeredNavigation\Block\Navigation\State" name="catalog.navigation.state" as="state" />
            <block class="Magento\LayeredNavigation\Block\Navigation\FilterRenderer" name="catalog.navigation.renderer" as="renderer" template="layer/filter.phtml"/>

Then cleared cache.

enter image description here

  • What will be condition if want layered navigation for particular category ID ? I was able to get in Magento 1 but not in Magento 2
    – Abhishek
    Jun 22, 2017 at 20:55
  • @Abhishek You need to add category filter for advanced search and then pass your category_id as parameter in url (hidden variable) then it will show layered navigation for that specific category. To add category filter you can refer this <magento.stackexchange.com/questions/176502/…>
    – Nitesh
    Jun 23, 2017 at 5:46
  • Thanks for your reply. But I want this on custom page. Suppose I want all filter attribute of category id 10 on "about us" page left side bar.
    – Abhishek
    Jun 25, 2017 at 12:46
  • @Abhishek Have you got any solution? If no then plz post new question with your requirements?
    – Nitesh
    Jun 30, 2017 at 5:54
  • I have already posted .. magento.stackexchange.com/questions/172674/…
    – Abhishek
    Jun 30, 2017 at 9:15

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .