0

Does anyone know how to prevent your custom theme from inheriting from a parent theme like blank or luma?

This apparently is adding its own css, and js, files to the page and is interfering with our own custom css, and js, files. And this is causing the store or page not to display correctly, or the way we want.

Thanks, Mike

0

Navigate to app/design/frontend/VENDOR/THEME/theme.xml and remove this line:

    <parent>Vendor/theme</parent>

Your theme will no longer use any files from any other themes, the templates and XML will load from the modules.

  • Thanks for your reply Ben. I tried that and I'm still getting erroneous stuff added to the page, files like styles-m.css and styles-l.css. In addition, there seems to be additional HTML added. – pollom Dec 5 '17 at 17:23
  • If you've removed that line it must be coming from a module? My answer here goes through setting up a theme with no parent and explains how to remove the CSS magento.stackexchange.com/questions/112655/… – Ben Crook Dec 5 '17 at 21:44
  • This what is being added automatically that I want to prevent from loading: vendor/magento/module-theme/view/frontend/templates/page/js/require_js.phtml vendor/magento/module-theme/view/frontend/templates/html/container.phtml Does your article take care of this? – pollom Dec 6 '17 at 17:12
  • I should have mentioned it before and that is that we migrated from 1.7.0.2 to 2.2 using the data migration tool. Should we run the code migration tool? Does that come into play with this stuff we're talking about? – pollom Dec 6 '17 at 17:36
  • Ahh, if it's coming from vendor/magento it will always fall back to this as they're core files. You'd need to manually remove each of these as far as I'm aware. – Ben Crook Dec 7 '17 at 9:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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