Magento Expert Forum - Improve your Magento experience

Results 1 to 15 of 15

Custom Theme Development In Magento 2

  1. #1
    [ Contributor ] Wajid Hussain's Avatar
    Join Date
    Nov 2014
    Thanked 14 Times in 12 Posts

    Default Custom Theme Development In Magento 2

    In the first part of this theme development series I explained the functioning of Magento folder structure work for themes. Now, this is the last part of the series and in this part, I am going to depict how to make the theme pages and give shape to the entire theme with styling.

    Configure Image Properties in Your Theme

    For configuration of catalog image sizes and other images, you need view.xml. This file is required for the theme if the product image sizes of your custom theme are different from the parent theme sizes. The view.xml file configures all storefront product image sizes. For example, you make the category grid view product images by specifying size of 350 x 350 pixels. Copy the view.xml file from the etc. directory of your parent theme to your theme’s etc directory and here is how the corresponding configuration would look like:

    <image id="category_page_grid" type="small_image">

    View more threads in the same category:

  2. #2
    New member
    Join Date
    Mar 2016
    Walnut,CA USA
    Thanked 0 Times in 0 Posts

    Default Magento 2.0.4 Includes Important Functional And Security

    Magento 2.0.4 includes important functional and security enhancements. You can find more information in the Enterprise Edition Release Notes and Community Edition Release Notes.

  3. #3
    Junior Member clapcreative's Avatar
    Join Date
    Jul 2015
    149 Mcafee court , Thousand Oaks CA 91360
    Thanked 6 Times in 6 Posts



    For the sake of compatibility, upgradability, and easy maintenance, do not modify the out of the box Magento themes. To customize the design of your Magento store, create a new custom theme.
    Set your Magento application to the developer mode. The application mode influences the way static files are cached by Magento. The recommendations about theme development we provide in this chapter are developer/default-mode specific.

    Create a theme directory

    To create the directory for your theme:

    Go to <your Magento install dir>/app/design/frontend.

    Create a new directory named according to your vendor name: /app/design/frontend/<Vendor>.

    Under the vendor directory, create a directory named according to your theme.

    ├── <Vendor>/
    │ │ ├──...<theme>/
    │ │ │ ├── ...
    │ │ │ ├── ...
    The folder name conventionally matches naming used in the theme’s code: any alphanumeric set of characters, as the vendor sees fit, is acceptable. This convention is merely a recommendation, so nothing prevents naming this directory in another way.
    Declare your theme

    After you create a directory for your theme, you must create theme.xml containing at least the theme name and the parent theme name (if the theme inherits from one). Optionally you can specify where the theme preview image is stored.

    Add or copy from an existing theme.xml to your theme directory
    Configure it using the following example:

    <theme xmlns:xsi="" xsi:noNamespaceSchemaLocation="urn:magento:framewo rk:Config/etc/theme.xsd">
    <title>New theme</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 -->
    Make your theme a Composer package (optional)

    Magento default themes are distributed as Composer packages.

    To distribute your theme as a package, add a composer.json file to the theme directory and register the package on a packaging server. A default public packaging server is

    composer.json provides theme dependency information.

    Example of a theme composer.json:

    "name": "magento/theme-frontend-luma",
    "description": "N/A",
    "require": {
    "php": "~5.5.0|~5.6.0|~7.0.0",
    "magento/theme-frontend-blank": "100.0.*",
    "magento/framework": "100.0.*"
    "type": "magento2-theme",
    "version": "100.0.1",
    "license": [
    "autoload": {
    "files": [
    You can find details about the Composer integration in the Magento system in Composer integration.
    Add registration.php

    To register your theme in the system, in your theme directory add a registration.php file with the following content:

    * Copyright © 2015 Magento. All rights reserved.
    * See COPYING.txt for license details.
    \Magento\Framework\Component\ComponentRegistrar::r egister(
    \Magento\Framework\Component\ComponentRegistrar::T HEME,
    Where <Vendor> is your vendor name, <theme> is the theme code.

    For illustration, see the registration.php file of the Magento Luma theme.
    Configure images

    Product image sizes and other properties used on the storefront are configured in a view.xml configuration file. It is required for a theme, but is optional if exists in the parent theme.

    If the product image sizes of your theme differ from those of the parent theme, or if your theme does not inherit from any theme, add view.xml using the following steps:

    Log in to your Magento server as a user with permissions to create directories and files in the Magento installation directory. (Typically, this is the the Magento file system owner.)

    Create the etc directory in your theme folder

    Copy view.xml from the etc directory of an existing theme (for example, from the Blank theme) to your theme’s etc directory.

    Configure all storefront product image sizes in view.xml. For example, you can make the category grid view product images square by specifying a size of 250 x 250 pixels, here is how the corresponding configuration would look like:

    <image id="category_page_grid" type="small_image">

    For details about images configuration in view.xml, see the Configure images properties for a theme topic.
    Create directories for static files

    Your theme will likely contain several types of static files: styles, fonts, JavaScript and images. Each type should be stored in a separate sub-directory of web in your theme folder:

    ├── web/
    │ ├── css/
    │ │ ├── source/
    │ ├── fonts/
    │ ├── images/
    │ ├── js/
    In the .../<theme>/web/images you store the general theme related static files. For example, a theme logo is stored in ...<theme>/web/images. It is likely that your theme will also contain module-specific files, which are stored in the corresponding sub-directories, like .../<theme>/<Namespace_Module>/web/css and similar. Managing the module-specific theme files is discussed in the following sections of this Guide.

    During theme development, when you change any files stored here, you need to clear pub/static and var/view_preprocessed directories, and then reload the pages. Otherwise the old versions of files are displayed on the storefront.
    Your theme directory structure now

    At this point your theme file structure looks as follows:

    ├── <theme>/
    │ ├── etc/
    │ │ ├── view.xml
    │ ├── web/
    │ │ ├── images
    │ │ │ ├── logo.svg
    │ ├── registration.php
    │ ├── theme.xml
    │ ├── composer.json
    Theme logo

    In the Magento application, the default format and name of a logo image is logo.svg. When you put a logo.svg image in the conventional location, which is <theme_dir>/web/images directory, it is automatically recognized as theme logo. It is displayed in your store page header once the theme is applied.

    In your custom theme, you can use a logo file with a different name and format, but you might need to declare it.

    The necessity of declaration depends on whether your theme has a parent theme and its logo image. The following cases are possible:

    Your theme does not have a parent theme:
    if your logo image name and format is default, logo.svg, there is no need to declare it;
    if your logo image name or format is not default, you need to declare it in layout.
    Your theme has a parent theme:
    if your theme logo image has the same name and format as the parent's theme logo, there is no need to declare it;
    if your logo image has different name or format, declare it in layout.

    Declaring theme logo

    To declare a theme logo, add an extending <theme_dir>/Magento_Theme/layout/default.xml layout.

    For example, if your logo file is my_logo.png sized 300x300px, you need to declare it as follows:

    <page xmlns:xsi="" xsi:noNamespaceSchemaLocation="urn:magento:framewo rk:View/Layout/etc/page_configuration.xsd">
    <referenceBlock name="logo">
    <argument name="logo_file" xsi:type="string">images/my_logo.png</argument>
    <argument name="logo_img_width" xsi:type="number">300</argument>
    <argument name="logo_img_height" xsi:type="number">300</argument>
    Declaring the logo size is optional.

    To learn more about theme layouts, refer to the Layout section of this guide.
    What’s next

    See the Apply and configure a theme in Admin topic.
    Uninstall a theme

    If your theme is a composer package, you can uninstall it using the theme uninstall CLI command.

    If your theme is not a Composer package, you must uninstall it manually by doing the following:

    Update the parent node information in child’s theme.xml to remove references to the theme.

    Remove theme code from the file system.

  4. The Following User Says Thank You to clapcreative For This Useful Post:

    ApnaaGhar (14-04-2017)

  5. #4
    Join Date
    Mar 2016
    Thanked 1 Time in 1 Post


    Read Complete Tutorial On Cloudways Blog:
    View more threads in the same category:

    Custom Theme Development In Magento 2
    Use Custom JavaScript in Magento 2
    Configure JavaScript resources in Magento 2
    Create Your Custom Theme In Magento 2 (Part-1)
    Display product prices in the catalog with and without tax in Magento
    Design magento to increase conversion rate!
    How to change logo in magento?
    How to edit footer links in magento?
    How to turn on template path hints in magento?
    Magento Design and Content Overview

  6. #5
    Junior Member
    Join Date
    Sep 2015
    Thanked 1 Time in 1 Post


    Useful post ! Also hava a look at new Responsive Theme for Magento 1 & 2 for more references:

    Adella Responsive Magento 2&1 Theme

    With more than 22 multi-concept layouts, graceful styles for blog, portfolio, store locator page, Adella promises to transform your site into a dynamic and optimized shopping experience.
    After installing the template, you get a great Promo Banner, Super Mega Menu as well as dozens of modern extensions & awesome features to capture the attention of visitors
    As a store admin, you will get Frontend Builder to have full permissions to configure/update your online Magento store theme as you want without any coding experiences required
    Name:  qqqqqqqqqqq.png
Views: 1531
Size:  100.4 KB

  7. #6
    Junior Member
    Join Date
    Sep 2016
    Thanked 3 Times in 3 Posts


    Can anyone please recommended me from where I can download the magento themes for free.

    Newspaper Ad Agency in Delhi | Best Teeth Whitening in Delhi | Cosmetic Dental Treatment in Delhi
    Last edited by vishnu; 24-11-2020 at 12:28 PM.

  8. #7
    New member
    Join Date
    Apr 2017
    Thanked 0 Times in 0 Posts


    thanks for the tutorial. It does help me a lot! I've read the two parts and your guide is really detailed and specific!

    spanish to english

  9. #8
    Junior Member
    Join Date
    Mar 2017
    Gurugram, Haryana
    Thanked 0 Times in 0 Posts


    Good tutorial, thanks for sharing this helpful post with us.

  10. #9
    Junior Member
    Join Date
    Mar 2017
    Thanked 1 Time in 1 Post


    A theme is the most important part of any online store. If the theme of your store is not up to the mark and fails to create an attractive outlook, there’s a fairly high chance, that your customers won’t incline towards coming back. To create a custom theme in Magento 2, follow these steps:

    1. Create directories:

    2. Declaration of Theme

    3. Registration of Theme

    4. Upload Theme Preview Image

    5. Declaration of Theme Logo

    6. Upload Theme Logo

    7. Apply Your Theme

    8. Run Commands

    Here's a simple guide on it: How to Create a Custom Theme in Magento 2

  11. #10
    Junior Member
    Join Date
    Apr 2018
    Thanked 0 Times in 0 Posts


    As we know, Magento comes with a default theme. Hence, the most important step in any Magento customization is design changes (both CSS and HTML Changes). Also, Minor text add/edits, layout changes, and other changes are usually required.

    The Magento system consists of layout XML files, CSS files, and PHTML files. In a specific PHP application, we have HTML/PHP and CSS files where we create/edit the design/layout of the website. But in case of Magento, we have .PHTML files to do the job HTML files.

    Hence, Magento follows MVC architecture and .PHTML file do the job of VIEW.

  12. #11
    Junior Member
    Join Date
    Sep 2018
    United Kingdom
    Thanked 2 Times in 2 Posts


    The abnormal state steps required to include another topic in the Magento framework are the accompanying: Create an index for the topic under application/structure/frontend/<your_vendor_name>/<your_theme_name> . Include an assertion document theme.xml and alternatively make and so forth index and make a record named view.xml to the topic catalog.

  13. #12
    New member
    Join Date
    Jul 2021
    Thanked 0 Times in 0 Posts


    My Estub is an online portal that helps to maintain payment details of any employee, information about the company’s yearly profit, access to the paycheck statement of any employee, etc. My Estub online employee portal is designed by an organization named Paperless Pay Corporation.
    panorama charter mycoles my estub

  14. #13
    Junior Member
    Join Date
    Oct 2021
    Thanked 0 Times in 0 Posts

    Default We are specialists in the production of real database registered novelty passports, Driver's License, ID Cards, Residence Permit, SSN, Full Citizenship Package, Diploma's, IELTS / TOEFL, Certificates and many more in which we record all information about the client in the proposed database system. Everything is real, and the client without problems uses the document legally.

    We make it easier for everyone to acquire a registered international passport, driver's license and more regardless of where you are from.

    Visit the website:

    What'sApp contact: +44 7459 562803
    Buy UK Driver's License Online | Buy UK Driver's License 1st
    Do you want to buy a UK driver's license without written or practical exam? Your solution is here. Buy UK driver's license online, Buy UK driver's license
    Buy Norway Drivers License | How Do I Get A Drivers License In Norway
    Buy Norway Drivers License Online, How Do I Get A Drivers License In Norway. We process and produce real registered Norwegian Drivers License Online

    Buy Registered Drivers License Online

    Buy Registered Passport Online

    Buy passport online | Buy Second Passport Online UK Europe the US
    Buy TOEFL/IELTS ONLINE | Buy TOEFL Certificate Online, 1st Class
    Buy TOEFL certificate without taking online exam. Buy IELTS certificate registered with the British council and verifiable online. Buy toefl/ielts online

    Buy Drivers License Online

    Buy Real Drivers License Online

    Buy Fake Drivers License Online

    Buy Passport Online

    Buy Registered Passport Online

    Buy Real And Fake Registered Passport Online

    Buy Registered IELTS | TOEFL Certificate Online
    Buy Passport Online | Buy A Second Passport Online
    Advantages of obtaining a second passport in Europe, US, and Canada is a life changing opportunity. Buy passport online, Buy real passport online

    Buy United State Passport online

    Buy Finland Passport online

    Buy UK Passport online

    Buy a German passport online | German passport application
    German passport online
    Buy Driver's License Online | Buy Real Driver's License Online
    Have you tried several time but still didn't passed the driving test? Do you want to buy a driver's license online, buy driver's license online

    Buy the United States Driver's License Online

    Buy Finland driving license online

    Buy UK driver's license online

    Buy a German driver's license online

    Buy German driver's license online | German driving license

    Buy New Zealand driver's license online

    Buy Latvian driver's license online

    Buy Ireland driver's license online

    Buy New Zealand passport online

    Buy Latvia Passport online

    Buy Ireland Passport online

    Buy Denmark Passport online

    Buy Portugal Passport online
    Buy Portuguese Passport Online | Buy Real And Fake Portuguese Passport Online


    Buy Cyprus Passport for Sale

    Buy Luxembourg Passport online

    Buy Turkish passport online

    Buy Dutch passport online

    Buy Norwegian passport online

    Buy Poland Passport online

    Buy Romania Passport online

    Buy Serbian passport online

    Buy Singapore Passport online

    Buy Greece Passport online

    Buy Hungarian passport online

    Buy a French passport online

    Buy US passport online

    Buy Romanian passport online

    Buy Slovenian passport online

    Buy Slovak passport online

    Buy Spanish passport online

    Buy a Swiss passport online

    Buy Thailand Passport online

    Buy Chile Passport online

    Buy Croatian passport online

    Buy Canadian passport online

    Buy Costa Rica Passport online

    Buy Estonian passport online

    Buy Australia Passport online

    Buy Denmark driving license online

    Buy Portugal driving license online

    Buy Cyprus Driver License For Sale

    Buy Luxembourg driver's license online

    Buy Turkish driver's license online

    Buy Dutch driver's license online

    Buy Norwegian driver's license online

    Buy Romania driver's license online
    Buy Serbian driver's license online

    Buy Australian driver's license online

    Buy a German passport online

    German passport application
    Buy German Passport Online | German Passport Application
    We process and produce real database registered German passport Online, buy German passport online, German passport application online
    Buy UK Passport Online | Buy Registered UK Passport Online
    Buy UK passport online, Buy real registered UK passport online. We produce bio-metrics database registered UK passport online, apply for UK passport.
    Buy Austrian Driver's License Online | Online Driving License
    Buy Austrian driver's license online without taking the driving license test and get your driver's license in 3 days. Apply for an Austrian driver's license
    Buy German Driver's License Online | German Driver's License
    We produce real and registered German driver's license online, buy German driver's license, apply for a German driver's license online in 3 days
    Buy Portuguese Passport Online | Buy Real And Fake Portuguese Passport Online
    Buying a Portuguese passport is open to anyone, with no restrictions on your nationality or residency. Buy Portuguese passport online.

    Contact WhatsApp: +44 7459 562803

    We use real sophisticated materials for creating documents.

    Whether real or fake documents, we use the same quality materials.

    The same materials that are used by all the authorities are the same materials that we use to create real documents.

    So everything will be 100% of the highest quality.

    All of our documents bear the secret features and could be seen under UV light with full spectrum Holograms.

    We digitally scan the fingerprints you send us and register them in the alleged database system.

    We assure all of our customers 100% SECURITY
    Buy Registered Drivers License Online

    Buy Registered Passport Online

  15. #14
    Junior Member
    Join Date
    Sep 2018
    Oman, Muscat
    Thanked 4 Times in 4 Posts


    Here are the rundown of steps you want to follow for a custom subject turn of events: Create a registry for the topic · Add a presentation for topic.

  16. #15
    Junior Member
    Join Date
    Sep 2018
    Thanked 1 Time in 1 Post


    These are the means for making a custom Magento topic.
    Stage 1: Make a Topic Registry.
    Stage 2: Proclaim Magento Topic.
    Stage 3: Add Writer Bundle.
    Stage 4: Add Registration.php Record.
    Stage 5: Design Custom Topic.
    Stage 6: Design Picture Properties.
    Stage 7: Proclaim Logo in Custom Topic.
    Stage 8: Legacy of Topic.

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts