Support » Themes and Templates » Twenty Eleven – removing the search box

  • Hi,
    I’m using the twenty eleven theme. Made a child theme, to make changes in the some of the style. One thing I’d like to do is remove the search box for on the header of the template. I’m getting used to to using firebug – I can see the code that is being used, but I’m not sure what to put on the style.css in my child theme.
    This site is
    Appreciate any help, also any suggestions on tutorials etc how to use firebug more to help me out as there are other changes I need to make.
    Thanks, Karlene

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Andrew Nevins


    Forum moderator

    Look at how to implement CSS display: none;
    with the firebug selectors you’ve found.

    if I understand you right
    this is what I find

    #branding .only-search #s, #branding .only-search #s:focus {

    so I would add this line to my childtheme style.css
    {display:none} after the previous lines?

    Moderator Andrew Nevins


    Forum moderator

    At the bottom of your childtheme style.css file, you need to combine the selectors you found from firebug,

    #branding .only-search #s, #branding .only-search #s:focus

    with the CSS style

    display: none;



    Forum Moderator

    Try adding this to the child theme style.css:

    #branding #searchform {
       display: none;

    Thank you both for your help! The search bar is now gone but it appears that the space that was taken up by the box itself is still taking up the real estate – thus making my menu overflow. Any additional code I should add?

    And any good tutorials (sounds like I need to understand selectors) for someone that doenst know CSS too well so I can plow my way thru doing this?

    commenting out the following from the header.php for 2011 worked like a charm for me.

    // Has the text been hidden?
    if ( 'blank' == get_header_textcolor() ) :
    <div class="only-search<?php if ( $header_image ) : ?> with-image<?php endif; ?>">
    <?php get_search_form(); ?>
    else :?>
    <?php get_search_form(); ?>
    <?php endif; ?>

    [Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your code may now have been permanently damaged/corrupted by the forum’s parser.]

    Agee – Thanks but I really want to do modifications in child theme format.
    Andrew – just another clarification. Every selector I see for the search bar – correct? There are more than what you lited. And can they be listed as you did above? Then add the display none?
    I tried what you put – like I said the search bar is gone but my menu bar runneth over – I have removed a menu item as a quick fix, but I do need to add it back in.
    Thanks again for your help – much appreciation!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Twenty Eleven – removing the search box’ is closed to new replies.