In the earlier posts, I have introduced you how to create New Theme in Magento 2 and Magento 2 Theme-built Sample Custom Theme in Magento 2. Here I will continue to discuss you the part 2 of this session.
- your module will have the following files
│ ├── etc/
│ │ ├── view.xml
│ ├── web/
│ │ ├── images
│ │ │ ├── logo.svg
│ ├── registration.php
│ ├── theme.xml
│ ├── composer.json
│ ├── media/
│ │ ├── preview.jpg
The default format and name of a logo image is logo.svg and the default format and the name of the preview is preview.jpg. When you put a logo.svg image in the predictable location, which is <theme_die>/web/images directory and preview.jpg to the <theme_dir>/media, it is automatically documented as theme logo and the preview image. It is displayed in your store page header once the theme is applied.
- Once constructing all of these files, please go to the console, Magento 2 root folder and type this command line:
PHP bin/Magento setup:upgrade
- The following theme will be set up. Then navigate to your admin page to apply the theme.
- To apply a theme 1
- In Admin, Navigate to Content>design>configuration.
- In the configuration record related to your store view, select Edit.
- On the Default theme tab, in the applied theme drop-down, choose Webnexs Simple Theme.
- Select save
- If caching is enabled, refresh the cache to make the change.
- To see your changes, reload the storefront pages.
The following steps I mentioned above are the simple process for you to build New Theme in Magento 2. With these guidelines, you can manage the New Theme in Magento 2 easily. All stores have a New Theme in Magento 2 with multiple elements.