In this tutorial, I will be throwing light on How to Add Link with Content to Top Menu in Magento 2.

Sometimes you may require to add a custom link on the top navigation menu in Magento 2. Other than the category, you may need to add some important links so that the information reaches the customers easily.

Let’s see How to Add a Link with Content to Top Menu in Magento 2. But before that, it’s necessary to create a file that is required for creating any module like module.xml, registration.php.

Steps to Add Link with Content to Top Menu in Magento 2:

Step 1: Go to the below file path

app\code\Vendor\Extension\etc\frontend\events.xml

Now, add the code as follows

Step 2: Then move to the below file location

app\code\Vendor\Extension\Observer\Topmenu.php

Add the code as mentioned below

Step 3: Finally, run the below command

Result: The link is added to the top menu in Magento 2.

top menu

Conclusion:

This way you can easily add a custom link to the top menu in Magneto 2. Fix the issue of the Navigation Menu not showing in Magento 2 –  Click Here

If you have any doubts, ask me through the comment section without hesitation. Share the article with your friends and stay in touch with us!

Happy Coding!

Click to rate this post!
[Total: 4 Average: 5]