How to move mini search form after header menu? I am using

<move element="top.search" destination="catalog.topnav" after="-"/>

to achieve this but no success.

enter image description here


Try below code

    <move element="top.search" destination="page.top" after="navigation.sections"/>
    OR As you need
    <move element="top.search" destination="page.top" after="catalog.topnav"/>


run below commands

php bin/magento cache:clean && php bin/magento cache:flush
  • Greate. That's work. – Shoaib Saleem Nov 20 '18 at 7:23
  • good, if your problem solved then please accept this answer – sphere Nov 20 '18 at 7:25
  • First line "after="navigation-sections"" works for me. – Shoaib Saleem Nov 20 '18 at 7:26

You can use this code:

<move element="top.search" destination="page.top" after="catalog.topnav"/>

you are catalog.topnav as destination which is not a container but it is a block.

  • I tried you code but it shows search form after banner slider of my home page. – Shoaib Saleem Nov 20 '18 at 7:29
  • Ok, It works for blank and luma theme, if it doesn't work, you may use navigation-sections as a value of after argument – Manish Joy Nov 20 '18 at 8:05

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.