How to remove / hide Search Box from WordPress Twenty Eleven theme?

In my opinion Twenty Eleven theme is really getting good response from self-hosted WordPress community. Everyday I am getting new customization tips requests for Twenty Eleven theme. Here is another small customization tips Twenty Eleven theme requested by one of our readers.

Remove Search box from Twenty Eleven theme

If you want to remove the search box from Twenty Eleven theme, go to Dashboard > Appearance > Editor. Now select header.php file and the following piece of code:

<?php get_search_form(); ?>

You should find it twice, remove both occurrences and save the changes.

Hide Search box from Twenty Eleven theme

Did you read your last post on Twenty Eleven child theme? I am going to show you how you can use your child theme to hide the search box. Go to Dashboard > Appearance > Editor and select the style.css of your child theme. Add the following piece of CSS code in that file.

#searchform { display:none; }

That’s it.

Jinnat Ul Hasan

By | On Tuesday, July 26th, 2011 | Under How To's | 13 Comments ยป


Contact our experts, most of the time we assist our readers free of charge.

Those who found this page were searching for:

  • How to get rid of comment box in twenty eleven theme
  • searchbox wordpress ausblenden
  • remove search box in twenty eleven theme
  • twentyeleven remove search bar
  • "Twenty Eleven" remove search
  • eliminate search bar in wp twentyten
  • wp 2011 theme remove search
  • remove search bar from wordpress theme twentyten
  • centering menu twenty eleven remove search form
  • remove search form from wordpress twenty eleven
  • Sorin Chiriac

    Hi all, I would like to know if is possible to hide the search button from the sidebar or to change the weight of the search input, because right now is not in line the input with the search button and is not looking good. Thank you.

  • Chris

    This worked thank you, and thanks to Michael for his tip too, my menu was wrappiing. However 1 menu item is still wrapping, any help?

  • abinashmohanty

    Hi Jinnat, I did the ‘hide’ step to remove the search box from my child them. ๐Ÿ™‚ It works. Thanks.

  • Michael

    Worked great, thx. One additional change. In Header.php, if you delete:

    <div class="only-search with-image”>

    from the header.php file, the pages will fill the menu all the way across. Otherwise, the area the search box should be in will remain empty.

  • Jason


    I tried removing both pieces of code as mentioned in your advice. I’m using WordPress Twenty Eleven Version 1.4. When eliminating both pieces of code, the search box still remains. Any advice?

  • esills

    Brilliant! Many thanks.

  • Hi,

    Thanks for the advice (I am using a child theme for twenty eleven). My question is: Can I still use the search widget on the sidebar? After I hid the serach box from the header, the search widget was hidden as well. I want no search bar in the header, but I need a serach bar in the sidebar…

    • Yes, I believe you will be able to use the search option on your sidebar.

      Feel free to contact us for further assistance.

      Thank you.

      • circadia

        When I used the code to hide the search form, it also took away the sidebar search widget (which I wanted to keep). But by doing it like this, it left the widget search alone and only ditched the default search from the header area:

        #branding #searchform {
        display: none;

  • Td

    Man thank you !

  • I have been trying to remove my search box in WordPress for a while now and everything I read didn’t work. I’m so thankful I found your website! Worked like a charm. I will be coming back for more tips when I get stuck. Thank you very much! ๐Ÿ™‚

  • Its really helpful for me. I am the regular reader of your bangla blog. Thanks

Previous post:

Next post: