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

3 Answers 3

2

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>
2

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" />
1
  • Works. Tested on 2.4.5-p1
    – puntable
    Mar 7 at 15:56
0

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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