{"id":345501,"date":"2022-07-27T04:45:21","date_gmt":"2022-07-27T04:45:21","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=345501"},"modified":"2023-04-27T05:46:04","modified_gmt":"2023-04-27T05:46:04","slug":"best-approach-to-creating-a-theme-in-magento-2","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/","title":{"rendered":"Understanding Magento Theme: Best approach to creating a theme in Magento 2"},"content":{"rendered":"\n<p>Hello Friends!!<\/p>\n\n\n\n<p>In today\u2019s blog, I will recommend the best approach for creating a custom theme.<\/p>\n\n\n\n<p>We should always use best practices for <a href=\"https:\/\/webkul.com\/blog\/the-best-approach-for-starting-a-new-theme-development-in-magento-2\/\">theme development<\/a> to avoid conflicts and issues with<br>our theme after we update or upgrade our Magento instance.<\/p>\n\n\n\n<p>By default, there are 2 Magento themes.<br>Luma and Blank<br>Luma is a demonstration theme, while Blank acts as a basis for custom Magento theme customization.<\/p>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<p>Firstly, let&#8217;s understand the directory structure.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"931\" height=\"650\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-2022-07-26-14_58_04.png\" alt=\"Screenshot-2022-07-26-14_58_04\" class=\"wp-image-345667\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-2022-07-26-14_58_04.png 931w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-2022-07-26-14_58_04-300x209.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-2022-07-26-14_58_04-250x175.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-2022-07-26-14_58_04-768x536.png 768w\" sizes=\"(max-width: 931px) 100vw, 931px\" loading=\"lazy\" \/><\/figure>\n<\/div><\/div>\n\n\n\n<p>Now Create a theme.xml file to initialize your theme.<\/p>\n\n\n\n<p>It contains the title of the theme, the preview image of the theme, the parent theme (all layouts of this theme), and CSS can be inherited by default.<\/p>\n\n\n\n<p>Example &#8211; <\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;theme xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;urn:magento:framework:Config\/etc\/theme.xsd&quot;&gt;\n     &lt;title&gt;Custom Theme&lt;\/title&gt;\n     &lt;parent&gt;Magento\/luma&lt;\/parent&gt;\n     &lt;media&gt;\n         &lt;preview_image&gt;media\/theme-preview.jpg&lt;\/preview_image&gt;\n     &lt;\/media&gt;\n&lt;\/theme&gt;<\/pre>\n\n\n\n<p>Create a composer.json file in your theme directory to register the package.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">\n{\n   &quot;name&quot;: &quot;Vendor\/themeName&quot;,\n   &quot;description&quot;: &quot;Custom theme in Magento 2&quot;,\n   &quot;require&quot;: {\n     &quot;php&quot;: &quot;~5.6|~7.0|~7.1|~7.2|~7.3|~7.4&quot;,\n     &quot;magento\/framework&quot;: &quot;100.0.*&quot;\n   },\n   &quot;type&quot;: &quot;magento2-custom-theme&quot;,\n   &quot;version&quot;: &quot;1.0.0&quot;,\n   &quot;autoload&quot;: {\n      &quot;files&quot;: &#091;\n         &quot;registration.php&quot;\n      ]\n    }\n}<\/pre>\n\n\n\n<p>Create a registration.php file in your theme directory to register your theme in Magento.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\n\\Magento\\Framework\\Component\\ComponentRegistrar::register(\n\\Magento\\Framework\\Component\\ComponentRegistrar::THEME,\n&#039;frontend\/Vendor\/ThemeName&#039;,\n__DIR__\n);\n?&gt;<\/pre>\n\n\n\n<p>Now create a view.xml file to change the type and size of the image or create your own type in the app\/design\/frontend\/Vendor\/themeName\/etc directory.<\/p>\n\n\n\n<p>Example &#8211; <\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;view xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;urn:magento:framework:Config\/etc\/view.xsd&quot;&gt;\n&lt;media&gt;\n&lt;images module=&quot;Magento_Catalog&quot;&gt;\n.....\n     &lt;image id=&quot;category_page_grid&quot; alt=&quot;preview_img&quot; type=&quot;small_image&quot;&gt;\n        &lt;width&gt;200&lt;\/width&gt;\n        &lt;height&gt;200&lt;\/height&gt;\n      &lt;\/image&gt;\n.....\n    &lt;\/images&gt;\n&lt;\/media&gt;\n&lt;\/view&gt;<\/pre>\n\n\n\n<p><strong>Base layouts &#8211;<\/strong><br>Layout files provided by modules, Location :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Page configuration and generic layout files: moduleDirectory\/view\/frontend\/layout<\/li>\n\n\n\n<li>Page layout files: moduleDirectory\/view\/frontend\/page_layout<\/li>\n<\/ul>\n\n\n\n<p><strong>Theme layouts:<\/strong><br>Layout files provided by themes, Location :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Page configuration and generic layout files: themeDirectory\/Vendor_ThemeName\/layout<\/li>\n\n\n\n<li>Page layout files: themeDirectory\/Vendor_ThemeName\/page_layout<\/li>\n<\/ul>\n\n\n\n<p>Always create new XML layout files instead of customizing and overriding .phtml templates.<br>Such as if you need to create a new container, it is better to add an XML file than override an existing template.<\/p>\n\n\n\n<p>We can create extending layout files, and modify our code as per our needs.<br>To extend the layout, add a layout file at the following location:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">themeDirectory\/Vendor_ThemeName\/layout\/layout.xml<\/pre>\n\n\n\n<p>Example &#8211;<br>To customize the layout defined in \/view\/frontend\/layout\/catalog_product_view.xml,<br>We need to create a layout file with the same name in our custom theme.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">\/Magento_Catalog\/layout\/catalog_product_view.xml<\/pre>\n\n\n\n<p><strong>Override base layouts &#8211;<\/strong><br>If we want to override the layout file, This means the new file that we place in the theme will be used instead of the parent theme layout file of the base layout file.<br>To override the base layout file, put a layout file with the same name at the following location &#8211;<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">themeDirectory\/Vendor_ThemeName\/layout\/override\/base\/layout.xml<\/pre>\n\n\n\n<p>Example &#8211; <\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">\/Magento_Checkout\/layout\/override\/base\/checkout_cart_index.xml<\/pre>\n\n\n\n<p><strong>Containers and blocks &#8211;<\/strong><br>Always change the position of a block or container using &lt;move&gt;.<br>To move an element, we have to refer to it with its name and then set the destination attribute which can either be a container or a block.<br>To add or remove a block or container by setting the remove or display attribute to true or false within the &lt;referenceBlock&gt;.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;referenceBlock name=&quot;block-name&quot; remove=&quot;true&quot; \/&gt; \nOR\n&lt;referenceContainer name=&quot;container-name&quot; display=&quot;false&quot; \/&gt;<\/pre>\n\n\n\n<p>Example &#8211;<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;page xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;urn:magento:framework:View\/Layout\/etc\/page_configuration.xsd&quot;&gt;\n   &lt;head\n        &lt;!-- Remove local resources --&gt;\n        &lt;remove src=&quot;css\/styles.css&quot; \/&gt;\n        &lt;!-- Remove external resources --&gt;\n        &lt;remove src=&quot;https:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/3.6.0\/jquery.min.js&quot;\/&gt;\n        &lt;remove src=&quot;http:\/\/fonts.googleapis.com\/css?family=Arials&quot; \/&gt; \n   &lt;\/head&gt;\n&lt;\/page&gt;<\/pre>\n\n\n\n<p>We can reorder block and container using the after and before attributes of the &lt;referenceBlock&gt; .<\/p>\n\n\n\n<p><strong>CSS &#8211;<\/strong><br>If you are inheriting from a default Magento theme, always extend the default styles instead of overriding them.<br>If possible, put your customizations in the _extend.less or _theme.less file, instead of overriding a .less file from a parent theme.<br>Your _theme.less file of the theme overrides your parent&#8217;s theme. So, if you have to assign a parent theme to your theme,<br>copy the all content from the parent file _theme.less of parents theme.<\/p>\n\n\n\n<p>If possible use Magento generic CSS classes.<br>It&#8217;s a best practice to use generic CSS classes because there are many third-party extensions that uses Magento generic CSS classes.<\/p>\n\n\n\n<p>You can also include your own custom CSS by adding it in the default_head_blocks.xml file which is located in the Magento_Theme module.<\/p>\n\n\n\n<p>Example &#8211;<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;page xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;urn:magento:framework:View\/Layout\/etc\/page_configuration.xsd&quot;&gt;\n    &lt;head&gt;\n        &lt;css src=&quot;css\/styles.css&quot; \/&gt;\n        &lt;css src=&quot;css\/print.css&quot; media=&quot;print&quot; \/&gt;\n    &lt;\/head&gt;\n&lt;\/page&gt;<\/pre>\n\n\n\n<p>When you are styling a custom theme, add styles to separate less files, instead of appending to a single file.<br>Because in this way, you can track down and debug the styles easily.<\/p>\n\n\n\n<p>As a reference, check [Magento_Blank_Theme_Path]\/web\/css\/_styles.less<\/p>\n\n\n\n<p>Translation<\/p>\n\n\n\n<p>If you need to change the phrases in the user interface, add custom CSV dictionary files instead of overriding .phtml templates.<\/p>\n\n\n\n<p>Always keep the text translatable.<br>To ensure all the text which are used within your Magento templates can be translated,<br>you should wrap it within the translate function:<\/p>\n\n\n\n<p>Example &#8211;<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;a href=&quot;#&quot;&gt;&lt;?= \/* @noEscape *\/ __(&#039;Show the Details&#039;); ?&gt;&lt;\/a&gt;<\/pre>\n\n\n\n<p>That\u2019s all about the custom&nbsp;<a href=\"https:\/\/webkul.com\/blog\/the-best-approach-for-starting-a-new-theme-development-in-magento-2\/\">theme development <\/a> Hope this will be helpful.<\/p>\n\n\n\n<p>If you have any questions please comment below, and we will try to respond to you.<\/p>\n\n\n\n<p>Thanks! \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello Friends!! In today\u2019s blog, I will recommend the best approach for creating a custom theme. We should always use best practices for theme development to avoid conflicts and issues withour theme after we update or upgrade our Magento instance. By default, there are 2 Magento themes.Luma and BlankLuma is a demonstration theme, while Blank <a href=\"https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":430,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[302,1177],"tags":[12955,12954,12952,12953],"class_list":["post-345501","post","type-post","status-publish","format-standard","hentry","category-magento2","category-theme","tag-create-your-own-custom-theme-in-magento-2","tag-how-to-create-custom-theme-in-magento-2","tag-the-best-approach-for-starting-a-new-theme-development-in-magento-2","tag-understanding-magento-theme-best-approach"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Understanding Magento Theme: Best approach to creating a theme in Magento 2 - Webkul Blog<\/title>\n<meta name=\"description\" content=\"the-best-approach-for-starting-a-new-theme-development-in-magento-2, create custom theme in magento 2, how to create theme in magento 2\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Understanding Magento Theme: Best approach to creating a theme in Magento 2 - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"the-best-approach-for-starting-a-new-theme-development-in-magento-2, create custom theme in magento 2, how to create theme in magento 2\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-27T04:45:21+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-04-27T05:46:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-2022-07-26-14_58_04.png\" \/>\n<meta name=\"author\" content=\"Shweta Singh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Shweta Singh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/\"},\"author\":{\"name\":\"Shweta Singh\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/2aa9e6c8f634365b94451ac7a636a444\"},\"headline\":\"Understanding Magento Theme: Best approach to creating a theme in Magento 2\",\"datePublished\":\"2022-07-27T04:45:21+00:00\",\"dateModified\":\"2023-04-27T05:46:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/\"},\"wordCount\":735,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-2022-07-26-14_58_04.png\",\"keywords\":[\"create your own custom theme in magento 2\",\"how to create custom theme in magento 2\",\"The best approach for starting a new theme development in Magento 2\",\"Understanding Magento Theme: best approach\"],\"articleSection\":[\"Magento2\",\"Theme\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/\",\"url\":\"https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/\",\"name\":\"Understanding Magento Theme: Best approach to creating a theme in Magento 2 - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-2022-07-26-14_58_04.png\",\"datePublished\":\"2022-07-27T04:45:21+00:00\",\"dateModified\":\"2023-04-27T05:46:04+00:00\",\"description\":\"the-best-approach-for-starting-a-new-theme-development-in-magento-2, create custom theme in magento 2, how to create theme in magento 2\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-2022-07-26-14_58_04.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-2022-07-26-14_58_04.png\",\"width\":931,\"height\":650,\"caption\":\"Screenshot-2022-07-26-14_58_04\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Understanding Magento Theme: Best approach to creating a theme in Magento 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/2aa9e6c8f634365b94451ac7a636a444\",\"name\":\"Shweta Singh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/51b8ea403cd7931cc8ef43d9b80e04e02143fd85bae4fe4ff866790408fb82d0?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/51b8ea403cd7931cc8ef43d9b80e04e02143fd85bae4fe4ff866790408fb82d0?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g\",\"caption\":\"Shweta Singh\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/shweta-singh342\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Understanding Magento Theme: Best approach to creating a theme in Magento 2 - Webkul Blog","description":"the-best-approach-for-starting-a-new-theme-development-in-magento-2, create custom theme in magento 2, how to create theme in magento 2","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/","og_locale":"en_US","og_type":"article","og_title":"Understanding Magento Theme: Best approach to creating a theme in Magento 2 - Webkul Blog","og_description":"the-best-approach-for-starting-a-new-theme-development-in-magento-2, create custom theme in magento 2, how to create theme in magento 2","og_url":"https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2022-07-27T04:45:21+00:00","article_modified_time":"2023-04-27T05:46:04+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-2022-07-26-14_58_04.png","type":"","width":"","height":""}],"author":"Shweta Singh","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Shweta Singh","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/"},"author":{"name":"Shweta Singh","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/2aa9e6c8f634365b94451ac7a636a444"},"headline":"Understanding Magento Theme: Best approach to creating a theme in Magento 2","datePublished":"2022-07-27T04:45:21+00:00","dateModified":"2023-04-27T05:46:04+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/"},"wordCount":735,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-2022-07-26-14_58_04.png","keywords":["create your own custom theme in magento 2","how to create custom theme in magento 2","The best approach for starting a new theme development in Magento 2","Understanding Magento Theme: best approach"],"articleSection":["Magento2","Theme"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/","url":"https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/","name":"Understanding Magento Theme: Best approach to creating a theme in Magento 2 - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-2022-07-26-14_58_04.png","datePublished":"2022-07-27T04:45:21+00:00","dateModified":"2023-04-27T05:46:04+00:00","description":"the-best-approach-for-starting-a-new-theme-development-in-magento-2, create custom theme in magento 2, how to create theme in magento 2","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-2022-07-26-14_58_04.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-2022-07-26-14_58_04.png","width":931,"height":650,"caption":"Screenshot-2022-07-26-14_58_04"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/best-approach-to-creating-a-theme-in-magento-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Understanding Magento Theme: Best approach to creating a theme in Magento 2"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/2aa9e6c8f634365b94451ac7a636a444","name":"Shweta Singh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/51b8ea403cd7931cc8ef43d9b80e04e02143fd85bae4fe4ff866790408fb82d0?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/51b8ea403cd7931cc8ef43d9b80e04e02143fd85bae4fe4ff866790408fb82d0?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g","caption":"Shweta Singh"},"url":"https:\/\/webkul.com\/blog\/author\/shweta-singh342\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/345501","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/430"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=345501"}],"version-history":[{"count":11,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/345501\/revisions"}],"predecessor-version":[{"id":378475,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/345501\/revisions\/378475"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=345501"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=345501"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=345501"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}