Magento 2 : Remove my account navigation links

Magento 2 : Remove my account navigation links

1. go to app/design/frontend/Vendor/themeName/Magento_Customer/layout
    and create
    (customer_account.xml)
2. <?xml version=”1.0″?>
<!--  
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<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">  
    <body>

        <!-- Remove unwanted account navigation links -->
        <!-- downloadable product link -->
        <referenceBlock name="customer-account-navigation-downloadable-products-link" remove="true"/>
        <!-- subscription link -->
        <referenceBlock name="customer-account-navigation-newsletter-subscriptions-link" remove="true"/>
        <!-- billing agreement link -->
        <referenceBlock name="customer-account-navigation-billing-agreements-link" remove="true"/>
        <!-- product review link -->
        <referenceBlock name="customer-account-navigation-product-reviews-link" remove="true"/>

        <!-- my credit card link -->
        <referenceBlock name="customer-account-navigation-my-credit-cards" remove="true"/>
        <!-- account link -->
        <referenceBlock name="customer-account-navigation-account-link" remove="true"/>
        <!-- account edit link -->
        <referenceBlock name="customer-account-navigation-account-edit-link" remove="true"/>
        <!-- address link -->
        <referenceBlock name="customer-account-navigation-address-link" remove="true"/>
        <!-- orders link -->
        <referenceBlock name="customer-account-navigation-orders-link" remove="true"/>
        <!-- wish list link -->
        <referenceBlock name="customer-account-navigation-wish-list-link" remove="true"/>

    </body>
</page> 

Share this post

Leave a Reply

Your email address will not be published. Required fields are marked *