How To Add A Navigation Link In My Account On Magento 2

My Account is an important place that helps store owners easily manage customers, their information, order-related details, and even newsletter subscriptions.

In today’s post, I will guide you on how to add navigation to your customer’s account dashboard.

How to add a Navigation Link in My Account in 2 steps:

Step 1: Create a file in your theme

Before making any customization, the first thing you would have to do is create a customer_account.xml in your theme. Follow this:


Step 2: Add Custom Link

In this step, the only thing that you would have to do is adding this code to your layout xml file:

<referenceBlock name="customer_account_navigation">
    <block class="Magento\Framework\View\Element\Html\Link\Current" name="customer-account-navigation-custom-link" after="-" >
             <argument name="label" xsi:type="string" translate="true">Custom Link Label</argument>
             <argument name="path" xsi:type="string">custom-path</argument>

That’s the instruction about adding a Navigation Link in My Account in Magento 2.

I hope that it solves your current issues related to Navigation link and helps you create a an optimized and easy-to-use My Account Menu for a better customer experience.

Thanks for reading!

Enjoyed the tutorial? Spread it to your friends!