I have try to create custom theme I have got following error.
Unable to load theme by specified key: 'Yogesh/mytheme'
Below is my folder structure.
\magento2\app\design\frontend\Yogesh\mytheme
- media
- preview.jpg
- composer.json
- registration.php
- theme.xml
Following are content of files.
Composer.json
{
"name": "magento/theme-frontend-blank",
"description": "N/A",
"require": {
"php": "~5.5.0|~5.6.0|~7.0.0",
"magento/theme-frontend-blank": "100.0.*",
"magento/framework": "100.0.*"
},
"type": "magento2-theme",
"version": "100.0.1",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"autoload": {
"files": [
"registration.php"
]
}
}
registration.php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::THEME,
'frontend/Yogesh/mytheme',
__DIR__
);
theme.xml
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>Yogesh mytheme</title>
<parent>Magento/blank</parent>
<media>
<preview_image>media/preview.jpg</preview_image>
</media>
I have try with php bin/magento setup:upgrade
but my module is not registered, not showing in config.php
.
After I have try to setup:static-content:deploy
but my theme content not deployed.
My theme is not able to load what mistake I have doing?