Removing Customer Account Navigation Links in Magento 2: A Step-by-Step Guide

How to Remove Customer Account Navigation Links In Magento 2

Hello Magento Folks,

How’s everything going? Here, I have come with some engaging topics for you. Don’t forget to visit the previously published article How to Enable Magento Error Logs In Magento 2.  Today, Let’s solve How to Remove Customer Account Navigation Links In Magento 2? in this article.

How to remove unnecessary customer account links in Magento 2

Magento by default displays a huge list of customer account links on the customer account page. If your business is based differently from other businesses and it does not support Newsletter Subscriptions then it is unnecessary in the list of links displayed at the customer account page. And many times there is a requirement of customizing all the default links because there is no specific requirement of all the links displayed at the customer account page. There are some sort of requirements to remove some links which are unnecessary for the customers.

Display Lists of links by default provided by Magento 2 on customer account screen below: 

  • My Orders
  • My Downloadable Products
  • Account Dashboard
  • Newsletter Subscriptions
  • Stored Payment Methods
  • Address Book
  • Account Information
  • Billing Agreements
  • My Wish List
  • My Product Reviews

Steps to How to remove navigational links

Step 1: Firstly, Create a custom extension or theme and override customer layout file

Create an extension and override the layout XML file

app/design/frontend/[Namespace]/[Theme]/Magento_Customer/layout/customer_account.xml

Step 2: Make use of a tag to remove any extra link from my account.

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

<body>

   <!-- Remove unwanted account navigation links -->

   <!-- Put this file in: app/design/frontend/[Namespace]/[Theme]/Magento_Customer/layout/customer_account.xml -->

   <!-- Store credit -->

   <referenceBlock name="customer-account-navigation-customer-balance-link" remove="true"/>

   <!-- 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-link" 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"/>

   <!-- Gift card link -->

   <referenceBlock name="customer-account-navigation-gift-card-link" remove="true"/>

   <!-- Order by SKU -->

   <referenceBlock name="customer-account-navigation-checkout-sku-link" remove="true"/>

   <!-- Gift registry -->

   <referenceBlock name="customer-account-navigation-giftregistry-link" remove="true"/>

   <!-- Reward points -->

   <referenceBlock name="customer-account-navigation-reward-link" remove="true"/>

</body>

</page>

Step 3: Now, simply clear cache and verify the My Account page the links will be removed.

Note: The above code will help you to remove the links and the tag remove=” true” output stands for the links are removed and will not be displayed.

Final Words

By implementing the above-given steps you will be able to successfully remove all the not required links from the customer account navigation. It was quite easy and simple steps if still facing any problems then don’t hesitate to contact our Support Team

You may also like Magento 2 Customer Account Links Manager by MageComp that Lets you manage frontend customer account dashboard links.

If you find the article interesting don’t forget to share with your Magento pals and do comment down your reviews on the article it will help us to be more precise. Read more helpful articles in our Magento Tutorial Series. Till then Stay Home Stay Safe

Happy Reading and be safe?

 

Previous Article

How to Enable Magento Error Logs In Magento 2

Next Article

Magento 2: Show Related Products On The List Page

Write a Comment
  1. Thanks buddy this will helped me a lot when I’m trying to remove some unnecessary link from my account page in Magento

Leave a Comment

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

Get Connect With Us

Subscribe to our email newsletter to get the latest posts delivered right to your email.
Pure inspiration, zero spam ✨