I'm using Magento 2 CE Version 2.1.0 on WAMP Windows 10
I already referred
Magento 2: How to override mini-cart default template html file?
Would like to override Magento 2 Default Luma Theme
I have below folder structure
magento2
|_ app
|_ design
|_ frontend
|_ Custom
|_Theme
|_Magento_Theme
|_templates
|_root.phtml - Copy of Luma
registration.php
theme.xml
app\design\frontend\Custom\Theme\Magento_Theme\registration.php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::THEME,
'frontend/Custom/Theme',
__DIR__
);
app\design\frontend\Custom\Theme\Magento_Theme\theme.xml
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>My Theme</title>
<parent>Magento/luma</parent>
</theme>
I run php bin/magento setup:static-content:deploy
& clear cache as well. It's not displaying my newly created Theme in Admin -> Content -> Design -> Configuration
. Edit Dropdown List.
What I'm still missing?
Best Answer
When creating any new theme or module you need to define registration.php file at root of your module or theme folder.
You haven't any problem for keep Theme name in camelcase but use standard way is much appreciated.
You have to define registration.php file inside Magento_Theme folder, its in wrong place.
Correct diagram of theme structure will be below,
Your path for registration.php is
app\design\frontend\Custom\theme\registration.php
registration.php file :
your theme.xml file path will be,
theme.xml file :
After all setup is completed, don't forget to run deploy command for the theme,
Check inside your admin panel,
Content -> Design -> Configuration
for set your custom theme.Remove cache and check in the frontend.