Magento 2.1.7 – Remove Sidebar.main and Sidebar.additional with XML Update

layout-updatemagento-2.1.7sidebarxml

So I have the in my category->Display Settings->Display Mode set to "Static block only"

And category->Design->Layout set to "1 column"

And category->Design->Layout Update XML

   <referenceContainer name="content">
     <referenceBlock name="sidebar.main" remove="true"/>
     <referenceBlock name="sidebar.additional" remove="true"/>
   </referenceContainer >

And sidebar.additional doesn't get removed, But what I notice is if I remove only one of them at time it works but I need to remove both.

What am I dong wrong with the xml updated?

Any help Please Appreciate.

Best Answer

The only solution It worked for me was xml update by removing catalog.leftnav e.g

 <referenceContainer name="content">
     <referenceBlock name="catalog.leftnav" remove="true"/>
 </referenceContainer >
Related Topic