Removing the search form from the Twenty-Eleven Header

  • Author
    Posts
  • #705531

    jaderaychel
    Member

    When the title is removed (and header remains) from the Twenty-Eleven Theme the search form is automatically added to the navigation bar. How do I alter this and remove the search form all-together?

    – Mike

    The blog I need help with is jaderaychel.wordpress.com.

    #705648

    timethief
    Member

    Just in case this re-positioning may suit you see here > https://en.forums.wordpress.com/topic/how-to-move-search-box?replies=5

    #705667

    @TT: That re-positioning “will put it in the right end of the navigation bar”, which is exactly what Mike doesn’t want.

    @mike: Add this to the CSS editor:

    #branding #searchform {
    display:none;
    }

    If you wish, you can add the Search widget to your sidebar instead.

    #705790

    I would recommend also taking away the right padding from inside the navigation bar if you’re going to hide the search box from there.

    #branding #searchform {
    	display:none;
    }
    #branding .only-search + #access div {
    	padding-right: 0px;
    }
    #705812

    jaderaychel
    Member

    Thanks you panaghiotisadam & designsimply. These alterations met my desire perfectly! Thank you both.

    #705837

    +1 thanks panaghiotisadam, you are appreciated! :)

    #705863

    jenbruce
    Member

    When I tried
    #branding #searchform {
    display:none;
    }

    It didn’t work until I removed #branding

    I’m a newbie and curious, can anyone tell me why?

    #705864

    @jenbruce, we need a link to the site you are talking about. CSS is theme specific and if you aren’t using the same theme, then the solution will likely be different.

    #705866

    bibisf
    Member

    @designsimply

    Thanks, worked perfectly!

    #705867

    @jenbruce, one reason might be that you were using a different theme and that’s why the #branding part of the selector wasn’t needed, or you were trying to remove a search form from the sidebar area and not the #branding area.

The topic ‘Removing the search form from the Twenty-Eleven Header’ is closed to new replies.