Magento Tutorials

How to Create Admin Menu in Magento 2

Hello Magento Friends,

Today I am going to throw light on How to Create Admin Menu in Magento 2.

Magento is at a leading place when it comes to customization. You can customize every bit of the website if you are working with Magento. Magento admin has various menu options that are useful to perform configuration settings on the store frontend. The menu options have submenus and the submenu have further other submenus. You can create your own custom menu on the admin sidebar of your Magento 2 store.

Follow the steps below to Create Admin Menu in Magento 2.

Steps to Create Admin Menu in Magento 2:

Step 1: Create an admin menu file named menu.xml file at the following path

app\code\Vendor\Extension\etc\adminhtml\menu.xml

Now add the below code

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
    <menu>
        <add id="Vendor_Extension::custom_menu" title="Custom Menu" module="Vendor_Extension" sortOrder="50" resource="Vendor_Extension::custom_menu"/>
        <add id="Vendor_Extension::notifications" title="Notifications" module="Vendor_Extension" sortOrder="10" action="vendorextension/notifications" resource="Vendor_Extension::notifications" parent="Vendor_Extension::custom_menu"/>
        <add id="Vendor_Extension::configuration" title="Configurations" module="Vendor_Extension" sortOrder="100" parent="Vendor_Extension::custom_menu" action="adminhtml/system_config/edit/section/custom_menu" resource="Vendor_Extension::configuration"/>
    </menu>
</config>

Checkout from your Magento Admin. A custom menu will be created as shown in the below image.

Conclusion:

Hence, accordingly, you can successfully Create Admin Menu in Magento 2. Alternatively, you can also Hide Admin Menu in Magento 2. If you have any doubts let me know via the comment box without any hesitation. Share the article with your friends and stay in touch!

Happy Reading!

Click to rate this post!
[Total: 6 Average: 5]
Dhiren Vasoya

Dhiren Vasoya is a Director and Co-founder at MageComp, Passionate 🎖️ Certified Magento Developer👨‍💻. He has more than 9 years of experience in Magento Development and completed 850+ projects to solve the most important E-commerce challenges. He is fond❤️ of coding and if he is not busy developing then you can find him at the cricket ground, hitting boundaries.🏏

View Comments

  • Dear Dhiren,
    Your article is very useful for me to understand and create a customised menu in magento. I have another request from customer, they hope create menu with header which is similar with magento stores menu:
    Settings
    All Stores
    Configuration
    Terms and Conditions
    Order Status
    then we can add our customised menu items under the header. Is there any way to implement it?
    Many thanks!

Recent Posts

What are Net Sales? How to Calculate Your Net Sales?

In the world of business, understanding financial metrics is crucial for making informed decisions and…

2 days ago

Magento 2 Extensions Digest April 2024 (New Release & Updates)

Welcome to the MageComp Monthly Digest, where we bring you the latest updates, releases, and…

2 days ago

The ABCs of Geofencing: Definition, Features and Uses

In this era, businesses are always on the lookout for ways to engage with their…

2 days ago

How to Delete Product Variant in a Shopify Remix App using GraphQL Mutations?

Managing a Shopify store efficiently involves keeping your product catalog organized. This includes removing outdated…

3 days ago

6 Innovative Tools Revolutionizing E-Commerce Operations

E-commerce has transformed the way consumers shop for products and services and interact with businesses.…

5 days ago

How Upcoming Cookie Changes Will Affect Your E-commerce Website?

The e-commerce world is constantly in flux. New tech and strategies emerge daily to help…

5 days ago