How To Add A Navigation Link In My Account On Magento 2
In today 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
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:
app/design/frontend/Mageplaza/_YOUR_THEME_/Magento_Customer/layout/customer_account.xml
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="-" >
<arguments>
<argument name="label" xsi:type="string" translate="true">Custom Link Label</argument>
<argument name="path" xsi:type="string">custom-path</argument>
</arguments>
</block>
</referenceBlock>
Hope that after reading this, you will be able to add the navigation links to your account with ease.
Enjoyed the tutorial? Spread it to your friends!
Featured Extensions
-30%
One Step Checkout
$139 ($199)
164 reviews
-30%
Layered Navigation
$69 ($99)
87 reviews
-30%
Automatic Related Products
$139 ($199)
25 reviews
-30%
PDF Invoice
$139 ($199)
23 reviews
-30%
Reward Points
$69 ($99)
14 reviews
-19%
B2B Solution
$465 ($576)
-30%
Product Feed
$104 ($149)
16 reviews