I am developing a custom "child" theme based off Luma and wondering how I might add a custom root.phtml . I have copied the entire contents of the vendor/theme-frontend-luma to my app/design/frontend/ folder now I also in the app/design/frontend/ have a child theme folder created. My issue is no matter what it always seems to load the root.phtml from the app/design/frontend/ folder and not the app/design/frontend// when I am viewing the child theme.

Does Magento2 not allow the root.phtml to be loaded from a child theme?I am trying to add additional links to css, and js files that are unique per store view/child them because this is a multi-site that uses different child themes for different store views.

1 Answer 1


Updated Please follow step.

1) create custom root.phtml in this folder. app/design/frontend/child_theme/Magento_Theme/templates/root.phtml

2) clear cache: bin/magento cache:clean

  • Thanks xanka , However it does not work for me and maybe its because I am trying to do it in a child theme folder ? My folder structure is app/design/frontend/design/Kiss/luma_kiss . I am using Luma as the parent and the only custom thing I am trying to do is add a custom css and some js files to the child theme folder. Your above way only works if I edit the root in the vendor/magento/module-theme/view/base/templates . folder
    – Jayreis
    Commented Jun 20, 2019 at 20:41
  • @Jayreis I updated my answer, I tested it's worked for me. Good luck!
    – xanka
    Commented Jun 21, 2019 at 8:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.