So I'm attempting to remove these sections of the Account page, i'm unable to find the reference block can someone help?
-
you only want to remove on Account Dashboard or on every link in sidebar– Waqar AliJan 10, 2020 at 12:50
-
Just the sidebar "My Orders" and "Recently Ordered" - Along with Recent Orders under the Address Book.– user85430Jan 10, 2020 at 12:52
1 Answer
Please use below code in your default.xml file of your theme
<?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="sale.reorder.sidebar" remove="true" />
<referenceBlock name="customer_account_dashboard_top" remove="true" />
</body>
</page>
clean cache and check again !!
-
Can you confirm where this file is? I've tried editing it in the /customtheme/theme/Magento_Theme/layout/default.xml and it doesn't seem to do anything. Jan 10, 2020 at 12:35
-
Please put file on this path /customtheme/theme/Magento_Sales/layout/default.xml Jan 10, 2020 at 13:16
-
I did this and it still didn't get rid of the elements I wanted, any other recommendations on where to put the file? Jan 10, 2020 at 15:01