Magento 2 Creating a theme

Hopefully I’m going to cover the things I’ve been unable to find out so far.

To create your own theme you need the following structure app/design/frontend/Somename/Somename1/

From here you then need Magento_Theme/layout/ and Magento_Theme/templates/ for your layout.xml files and template.phtml files

Back in app/design/frontend/Somename/Somename1/ you need a web/ folder with the following structure





In app/design/frontend/Somename/Somename1/ you will also need registration.php and theme.xml.


Your registration file should contain the following where the somename and somename1 match your folder structure

* Copyright © 2015 Magento. All rights reserved.
* See COPYING.txt for license details.


Your theme.xml file should contain the following where <parent> is if you are extending another theme

<theme xmlns:xsi=”” xsi:noNamespaceSchemaLocation=”urn:magento:framework:Config/etc/theme.xsd”>
<title>A NAME</title> <!– your theme’s name –>
<parent>Magento/blank</parent> <!– the parent theme, in case your theme inherits from an existing theme –>
<preview_image>media/preview.jpg</preview_image> <!– the path to your theme’s preview image –>

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.