0

I have created a custom header container and placed inside

app/design/Foo/bar/Magento_Theme/templates/html/header.phtml

Now the content I need is showing up, but also displaying default header contents link links, welcome message, search, logo and titles.

I tried removing them by remove="true" in frontend default.xml, it removes my custom design as well.

Please correct me or let me know how I can use a custom header. Right way of doing it. Thanks

0

To create a custom header, you must create a default.xml layout in design/fontend//default/Magento-Theme/layout In this layout you can remove blocks you don't want. The original template in Magento is in app/code/Magento/Theme/view/frontend/layout/default.xml

To remove a block just write : or It depends on which block. Some blocks are necessary to Magento, for example because they have some important js files include. So you can not displayed them but not remove.

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.