Our brands

Amazing tutorial for Create Magento 2 child theme

Magento-create-child-themes

As you know, Magento is open-source. So you can customize your themes easily. When you create Magento 2 Child theme which is inherited and you are able to take any items in the parent theme. You can correspond your theme for exact themes you want. This tutorial will show you step-by-step “ How to create child theme on venusthemes?

1. Create child theme folder which was placed on the same folder of parent theme

(ex: app/design/frontend/Venustheme/).We will try to Create a child theme of Oshop theme.

magento_create_child_theme

2. Copy files:

LICENSE.txt, LICENSE_AFL.txt and folders: etc/, Magento_Theme/, media/ from parent theme(copy from folder ../Venustheme/oshop/) to the child theme folder. We will have: ../Venustheme/oshop_child/etc, /Magento_theme, media/ (Note: You can copy there other folders if you want to custom from parent theme. Ex: web/ and Ves_Themesettings/)

3. Create the file: theme.xml with content as this:

 

 Venustheme Oshop Child
 Venustheme/oshop
 
 media/preview.jpg
 

With:

Venustheme/oshop

Venustheme/oshop is parent theme name: Venustheme/oshop

4. Create the file: registration.php with content as this:



is define path to child theme.
5. Create the file: composer.json with content as this:


 {
 "name": "venustheme/theme-frontend-oshop-child",
 "description": "N/A",
 "require": {
 "php": "~5.5.0|~5.6.0|~7.0.0",
 "magento/theme-frontend-oshop": "100.0.*",
 "magento/framework": "100.0.*"
 },
 "type": "magento2-theme",
 "version": "100.0.2",
 "license": [
 "OSL-3.0",
 "AFL-3.0"
 ],
 "autoload": {
 "files": [
 "registration.php"
 ]
 }
}

6. Then you should run ssh commands to setup the theme in magento2:

php bin/magento setup:upgrade --keep-generated

php bin/magento setup:static-content:deploy 

More information to create custom theme you can follow magneto 2 theme guide: http://devdocs.magento.com/guides/v2.1/frontend-dev-guide/themes/theme-create.html

Congratulation! You ‘ve finished creating Magento 2 child theme.

If you still confuse about this Tutorials, please feel free to contact our professional support team with more than 7 years of experiences for more helpful aid.

All questions are always welcomed. Contact us now! Magento Development Services

Related Posts

MAGENTO 2 TUTORIALS
MEMBERSHIP MAGENTO THEMES
HOW TO ADD MAGENTO 2 CUSTOMER GROUPS
ULTIMATE WAY FOR MAGENTO 2 ADD CATEGORY |VENUSTHEME
HOW TO SET UP MAGENTO 2 IMPORT PRODUCTS QUICKLY?
BEST WAY TO ADD PRODUCT ATTRIBUTE MAGENTO 2
QUICKEST WAY TO ADD IMAGE PRODUCT MAGENTO 2

Share this Post!

Panda Thuan
Panda Thuan
Creativity is falling in love with the world

0 Comment

Leave a Comment

Your email address will not be published.

Do NOT follow this link or you will be banned from the site!