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:

1
<?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.

1
#searchform { display:none; }

That’s it.

Regards,
Jinnat Ul Hasan

By | On Tuesday, July 26th, 2011 | Under How To's | 12 Comments »


DO YOU NEED OUR HELP?

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

Those who found this page were searching for:

  • remove search bar wordpress html
  • remove the search field in twnety elven
  • how to remove search twentyeleven theme
  • hide searchform css
  • Removing Search Box in Twenty Eleven Theme WordPress
  • wordpress how to get rid of search bar
  • remove home and search from twenty eleven
  • wordpress removing the search box
  • how to remove home link from twentyeleven theme
  • twenty ten remove search bar
  • 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

    Hello,

    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.

  • http://www.hristinadimitrova.com Hristina

    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…

    • https://plus.google.com/114832683100288461944/ Jinnat Ul Hasan

      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 !

  • http://www.mamastrendytips.com Jocelyne

    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! :)

    • https://plus.google.com/114832683100288461944/ Jinnat Ul Hasan

      You are welcome. Glad that our tips worked for you.

  • http://www.ltsenter.blogspot.com LTStajul

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

Previous post:

Next post: