0

I use Magento2 with sample data Luma theme and I applied a new custom theme Now I need to know the right way to add the navigation menu inside the header I want it between the logo and search box

1

You can try this,

You can move navigation menu using move element

add below lines to default.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout  /etc/page_configuration.xsd">
    <body>
        <move element="catalog.topnav" destination="header-wrapper" />
    </body>
</page>
0

Try below code in default.xml layout file of your custom theme.

<move element="navigation.sections" destination="header.panel"/>
0

This one works correct. Even this one did not break the mobile navigation and add after the logo.

<move element="navigation.sections" destination="header-wrapper" />

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.