Monday, 13 August 2018

Register Custom Theme in Magento 2

1) Create Folder in side app/design/frontend/<Vendor>/<ThemeName>
2) Declear your theme by creating theme.xml

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
    <title>Theme Name</title> <!-- your theme's name -->
    <parent>Magento/blank</parent> <!-- parent theme, in case your theme inherits from an existing theme -->
    <media>
        <preview_image>media/preview.jpg</preview_image> <!-- path of your theme's preview image -->
    </media>
</theme>

3) Register the theme by creating registration.php

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
   \Magento\Framework\Component\ComponentRegistrar::THEME,
   'frontend/<Vendor>/<ThemeName>',
   __DIR__
);

4)Upgrade System:php bin/magneto setup:upgrade

No comments:

Post a Comment