ex:

/web/media/logo.svg
If you want some other file for logo, then you must declare it in default.xml
the file.This file is also used to override default theme’s settings.media/preview.png :- The preview of the current theme.web :- This directory contains all the theme’s static data like images, styles, javascript, fonts etc.registration.php :- This file is required to register our theme to Magento2 system.theme.xml :- This is a compulsory file that defines our theme name, its parent and optionally theme’s preview image.
composer.json :- If you plan to distribute the theme using a composer package will make it easier for people to install the custom theme, you can specify any required packages in which composer can install / update for the user to ensure the theme installs correctly.Creating theme filesLet us now create our files one by one.
Creating theme files
Let us now create our files one by one.
theme.xml ( app/design/frontend/Venustheme/gemme_child/theme.xml )
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>Gemme Child</title> <!-- your theme's name -->
<parent>Magento/blank</parent> <!-- the parent theme -->
<media>
<preview_image>media/preview.jpg</preview_image> <!-- theme's preview image -->
</media>
</theme>
registration.php ( app/design/frontend/Venustheme/gemme_child/registration.php )
<?php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::THEME,
'frontend/Venustheme/gemme_child',
__DIR__
);
composer.json ( app/design/frontend/Venustheme/gemme_child/composer.json )
{
"name": "magento/theme-frontend-gemme_child",
"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.2",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"autoload": {
"files": [
"registration.php"
]
}
}
Please go to Admin -> Content -> Configuration
Then open Design Configuration -> choose Gemme child
* Important: After you choose new theme or new theme child, you need reindex data and run command below via SSH:
php bin/magento setup:static-content:deploy
0 Comment