2

This question already has an answer here:

I have created one module and theme, theme extend to magento blank.I am trying to remove the header part in app/design/frontend/Gworks/Gtheme/Magento_Theme/layout/default.xml. But none of changes in my page. Please any help to dictate where I did mistake

below one is my dafault.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <remove name="header.container"/> </body> </page>

Magento Blank theme dafault.xml path vendor/magento/theme-frontend-blank/Magento_Theme/layout/default.xml

at the same time how to add new header?

marked as duplicate by Fabian Schmengler, Raphael at Digital Pianism, Qaisar Satti, Marius Feb 19 '16 at 9:39

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

6

You have to add below code in default.xml file,

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
  <body> 
      <referenceBlock name="header.container" remove="true" />  
  </body> 
</page>

Put above code and remove var folder its working fine.

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