I want to move the search bar right after the logo and sign-in, and sign-up link next to search bar. I have used the below instruction in my theme xml file but its not working.

<move element="top.search" destination="header-wrapper" after="logo" />

Code in default.xml

<?xml version="1.0" encoding="UTF-8"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="3columns" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
   <update handle="default_head_blocks" />
      <move element="top.search" destination="header-wrapper" after="logo" />
      <move element="authorization-link-login" destination="header-wrapper" after="top.search" />

I'm getting as below but I want to show as search bar after the logo and signin and signup next to search bar: enter image description here

Please help.

  • you are share me screenshort?? what want to. Oct 16, 2020 at 17:22
  • If you use the custom theme, please share the code of default.xml file which is in Magento_Theme module of your custom theme. Oct 17, 2020 at 5:20
  • @madani, I have added the code which I have used in default.xml. Please check and help
    – MagentoDev
    Oct 17, 2020 at 7:03

1 Answer 1


You can try below XML

<referenceContainer name="header-wrapper">
    <container name="link.login" htmlTag="ul" htmlClass="login-link" before="minicart" />

<move element="top.search" destination="header-wrapper" after="logo" />
<move element="authorization-link" destination="link.login"/> 

Add below css

.page-header .block.block-search {
    float: left;
.page-header .login-link {
    margin: 0;
    display: inline-block;

Hope this will help you..!

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.