skip to Main Content

I’m attempting to customise the ultimo theme (although presumably this would apply to any magento theme). I have created a new custom theme which (using theme.xml) uses Infortis/ultimo as it’s parent.

Ultimo has the following path for it’s header.phtml

ultimo/default/template/page/html/header.phtml

I’ve tried a number of different options for my theme to override this – none of which appear to work e.g.

frontend/my_theme/default/template/html/header.phtml
frontend/my_theme/default/template/page/html/header.phtml

Does anyone have any ideas?

3

Answers


  1. Use the theme path to override your template

    Like app/design/<Vendor>/<Package>/<Module_Package>/templates/your.phtml

    Login or Signup to reply.
  2. It seems you are using magneto 1.X (By your reference code)

    In Magento 1.X

    First you should configure your new package/theme in the backed.

    System -> Configuration -> Design -> Package = my_theme
    
    Themes: default (no change should be necessary)
    

    Now you can modified file header.phtml

    appdesignfrontendmy_themedefaulttemplatehtmlheader.phtml
    

    In Magento 2

    appdesignfrontend<VENDOR_NAME><THEME_NAME>Magento_Themetemplateshtmlheader.phtml
    
    Login or Signup to reply.
  3. In Your theme.xml you set the parent the as Infortis/ultimo

      <parent>Infortis/ultimo</parent>
    

    just like
    /Infortis/ultimo/template/page/html/header.phtml

    /Custom/Theme/template/page/html/header.phtml

    please clear and flush cache

    and deploy and give permission

    sudo php bin/magento cache:clean

    sudo php bin/magento cache:flush

    sudo php bin/magento setup:static-content:deploy

    sudo chmod 777 -R var/ pub/media pub/static

    Note: dont’ forget to set Store Them As your custom created theme..

    registration.php Code

    MagentoFrameworkComponentComponentRegistrar::register(
    MagentoFrameworkComponentComponentRegistrar::THEME,
    'frontend/Custom/Theme',
    __DIR__
    

    );

    theme.xml

    <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
    <title>New Custom</title>
    <parent>Infortis/ultimo</parent>
    <media>
        <preview_image>media/preview.png</preview_image>
    </media>
    

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search