Move search bar from header in home page in magento

14,798

you need to edit catalogsearch.xml in your theme's layout folder and delete the following lines:

<reference name="header">
     <block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml"/>
 </reference>

That will remove it from the header of every page. Now, to insert it into your homepage. Go to the admin under CMS>Pages and select your Home Page. Paste the lines into the Content section wherever you want the search box to appear:

{{block type="core/template" name="home.search" as="homeSearch" template="catalogsearch/form.mini.phtml"}}

Good luck,
JD

Share:
14,798
Aisha
Author by

Aisha

Iphone/Ipad apps developer

Updated on June 04, 2022

Comments

  • Aisha
    Aisha almost 2 years

    I am a new to magento. I wanted to move the search bar from the header to the middle position on home page so that it displays only on the home page.

    I've read many related answers on the magento forum but all are trying to edit .mini-search element in boxes.css but unfortunately I don't have any such element in this file.

    So, how can I do this?