1

I need to remove the side bar only in My Account page.

I had removed the side bar in Magento_Customer > Layout > customer_account.xml but it removes from all the pages like (my address page,view orders page).

Code:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd" label="Customer My Account (All Pages)" design_abstraction="custom">
<head>
    <title>My Accounts</title>
</head>
<body>
    <referenceBlock name="sidebar.main.account_nav" remove="true"/>
</body>

Thanks in advance.

1

Please try to create this file

customer_account_index.xml

and add below line in that XML and clear Magento cache and check

<referenceBlock name="sidebar.main.account_nav" remove="true"/>

UPDATE :

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

</page>

Here you can see layout="1column" in above content (You can use 2columns-left, 2columns-right, or your custom layout name here). It will change layout of your customer account page.

Hope this will help you!

4
  • Can i change page to single column page @kishan savaliya
    – Sabareesh
    Feb 28 '20 at 5:48
  • Yes, Please check my updated answer @Sabareesh Feb 28 '20 at 6:05
  • 1
    Yes bro it is working thanks brother :-)
    – Sabareesh
    Feb 28 '20 at 6:07
  • You're welcome ;-) Feb 28 '20 at 6:12

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.