2

I want to remove the search bar completely from my website. I've had a hard time trying to figure this out.

4 Answers 4

6

Rather try this easy way by putting it into local.xml in your theme layout folder

<layout>
  <default>
    <reference name="header">
        <remove name="top.search"/>
    </reference>
 </default>
</layout>
  • Refresh your cache after saving this code.
4

Place a local.xml file in your template layout (e.g. app/design/frontend/yourpackage/yourtheme/layout/local.xml) with the following content

<?xml version="1.0"?>
<layout version="0.1.0">
    <default>
       <reference name="header">
         <remove name="top.search" />
       </reference>
    </default>
</layout>

If you already have a local.xml file in there, just insert the <default> node or the <remove> node accordingly.

3
  • 1
    Doesn't work. Just tried it on a clean install.
    – Shaughn
    Commented Apr 29, 2015 at 22:55
  • Please try again, I've been doing it this way for a long time :) make sure you put the local.xml file in the right place and clear your cache Commented Apr 29, 2015 at 23:29
  • What version you testing on? I have this setup correctly and the search bar does not get removed
    – Shaughn
    Commented Apr 30, 2015 at 0:53
1

It all depends on your theme, but they should all be the same. Open up the template:

app/design/frontend/[INTERFACE]/[THEME]/template/page/html/header.phtml

Then, change the following:

<?php echo $this->getChildHtml('topSearch') ?>

to:

<?php //echo $this->getChildHtml('topSearch') ?>

Clear caches and refresh. The search should disappear.

If you wanted to, you could disable the module completely, but i wouldn't recommend it as it will open up a whole new set of problems regarding dependancies, etc.

0

just open your "style.css" and find code #header-search then add display: none; in it or replace with display: block; if available

5
  • Perfect, Thank you! I appreciate everyone's help!
    – Wilsooo
    Commented Apr 30, 2015 at 15:38
  • If this is useful for you please accept this as "Answer"
    – sIiiS
    Commented May 1, 2015 at 16:07
  • Don't do following this. If it works, it doesn't mean, that its good solution
    – zhartaunik
    Commented May 1, 2015 at 16:51
  • Why not? What will happen if I just edit the css?
    – Wilsooo
    Commented May 1, 2015 at 17:10
  • Not happened! your search bar will be hidden as you need, I don't know why others don't accept this method and set negative rating to my answer, I am so sorry for them!!
    – sIiiS
    Commented May 2, 2015 at 7:24

Your Answer

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

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