ClickCease

Fill the form & Get Installation Support





    Here we will explain how to create admin theme and how to apply the admin theme in Magento 2.

    First we need to switch the Magento 2 application to the developer mode.

    Create Admin Theme

    Now, we will explain step-by-step that what should be done.

    Step 1: First create a <VendorName>/<theme name> folder at the app/design/adminhtml path for the new Magento admin theme.

    Here we use Magemonkeys as VendorName and backend as theme name so path would be like this app/design/adminhtml/Magemonkeys/backend/

    Step 2: In order to define Magento themes in the theme root folder create a theme.xml file at app/design/adminhtml/Magemonkeys/backend/ and paste the below code:

    Step 3: In order to register a theme in the system & theme folder create a registration.php file at app/design/adminhtml/Magemonkeys/backend/ and paste the below code :

    Step 4: Now we changed the logo on the admin login page and in the dashboard.  So put your images in the app/design/adminhtml/Magemonkeys/backend/web/images folder to save the media file.

    Create a Module to apply an admin theme

    Step 1: The theme has already been created, but it is still unconnected. We create a specialised <VendorName>/<ModuleName> module in the app/code/ folder to connect the admin theme.

    We will show you an example of a Magemonkeys/Backend module for the following path: app/code/Magemonkeys/Backend

    Step 2: create a registration.php file in the app/code/Magemonkeys/Backend folder with the following code:

    Step 3: Create a module.xml and di.xml file in the app/code/Magemonkeys/Backend/etc folder.

    copy below code and add in module.xml

    copy below code and add in di.xml

    Step 4: Create a admin_login.xml file in the app/code/Magemonkeys/Backend/view/adminhtml/layout/ folder with the following code:

    Step 5: Create a default.xml file in the app/code/Magemonkeys/Backend/view/adminhtml/layout/ folder with the following code:

    Step 5: Now run the following command:

     

    Fill the below form if you have any Magento programming need.





      Recent Articles

      Author Info

      Hire B. Darji

      Get a Free Quote





        Close

        mage Monkeys

        Let’s initiate a discussion!!

        Book a call

        Let our Magento expert connect to discuss your requirement.


          We offer Magento
          certified developers.

          Our Magento clientele
          is 500+.

          We sign NDA for the
          security of your projects.

          We’ve performed 100+
          Magento migration projects.

          Free quotation
          on your project.

          Three months warranty on
          code developed by us.