In the previous posts, I have introduced you How to Create New Theme in Magento 2 and Magento 2 Theme – Create Sample Custom Theme in M2. Now, I will continue to show you the part 2 of this tutorial.
- After part 1, your module will have 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 name of the preview (in the admin) is preview.jpg. .When you put a logo.svg image in the conventional location, which is <theme_dir>/web/images directory and preview.jpg to the <theme_dir>/media, it is automatically recognized as theme logo and the preview image. It is displayed in your store page header once the theme is applied.
- After creating all of these files, please go to the console, Magento 2 root folder and type this command line:
- PHP bin/Magento setup:upgrade
- The theme will be installed. Then, please go to your admin page to apply the theme.
- To apply a theme:
- In Admin, go to CONTENT > Design > Configuration.
- In the configuration record corresponding to your store view, click Edit.
- On the Default Theme tab, in the Applied Theme drop-down, select Magestore SimpleTheme.
- Click Save.
- If caching is enabled, refresh the cache to make the change.
- To see your changes applied, reload the storefront pages.
The steps I mention above is the shortest process for you to Create New Theme in Magento 2 . With this guide, you can manage the New Theme in Magento 2 easily. Every store has a New Theme in Magento 2 with many attributes.
Thank you for reading this post and see you in other posts from Magestore!
Your Magento website needs a powerful Magento ERP for stock control.
DON'T MISS THE CHANCE!