2

How can I add top-header above main menu?

I need top-header with text above main menu

1 Answer 1

2

In magento2, you can change the position of a container using the move tag

Create default.xml at app/design/frontend/{YourThemevendor}/{Themename}/Magento_Theme/layout/ and add below code:

<?xml version="1.0"?>
<page  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">  
    <body>
    <move element="header.panel.wrapper" destination="page.top" before="navigation.sections"/>  
    </body>
</page> 
1
  • Where should I add this code?
    – wluczykuj
    Commented Oct 9, 2018 at 7:51

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.