How to Add Top Link in Magento 2

How to Add Tracking Number to the Current Order Shipment in Magento 2

Website header is the best place to show links of the important pages. Top links on a website effectively engage users and ease the access to pages like “My Account”, “My Wishlist”, “My Cart”, etc. It helps to redirect the users to particular pages such as wishlist page or cart page, where chances of the conversions are high! The top links must be configured in such a way that it serves multi-purpose of easy navigation and boost sales.

Magento 2 has various default top links as My Account, Wishlist, etc. Sometimes, store owners require to add custom Magento 2 top links to strategize improved user experience and sales boost.

Today I’ve come up with the tutorial to add top link in Magento 2. Use the code as per your requirement.

Method to Add Top Link in Magento 2:

Go to app/code/Vendor/Extension/view/frontend/layout/default.xml and paste the below code.


Once you implement the above code, you are able to redirect users to any CMS page focussed on specific information, with the help of top links.

This is it to adding top links in a Magento 2 store. However, if you face any difficulty in the code, just drop your query in the comments section below and I’ll help you out ?

For the programmatic method to remove the top link, refer here.

Flash 5 stars if the post is helpful to you ?

Happy Coding ?

Get Weekly Updates

Never miss Magento tips, tricks, tutorials, and news.

Thank you for subscribing.

Something went wrong.

(based on 15 Reviews)

Sanjay is a co-founder at Meetanshi. He is a Certified Magento Developer who loves creating Magento E-commerce solutions. Owing to his contributions in Magento Forums and posting solutions, he is among the top 50 contributors of the Magento community in 2019. When he is not engrossed with anything related to Magento, he loves to play cricket.

Leave a reply:

Your email address will not be published.