WordPress.org

Support

Support » How-To and Troubleshooting » Remove search box from header in twentyeleven

Remove search box from header in twentyeleven

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

    @anevins

    Forum moderator

    Are you using a Child Theme?
    You could add display: none; to the <div> containing your search fields.

    Is it necessary to copy search field from twenty elven to child theme?

    Moderator Andrew Nevins

    @anevins

    Forum moderator

    No, that is not necessary. Use the Child Theme’s style.css file for this alteration.

    Style.css is not working in my site. How can I be sure that I am using childtheme?

    Eric Amundson

    @sewmyheadon

    Volunteer Moderator

    Yo aasbd,

    You certainly are using a style.css file in your theme and if you look on line 632, you’ll see:

    #branding #s {
    	float: right;
    	-webkit-transition-duration: 400ms;
    	-webkit-transition-property: width, background;
    	-webkit-transition-timing-function: ease;
    	-moz-transition-duration: 400ms;
    	-moz-transition-property: width, background;
    	-moz-transition-timing-function: ease;
    	-o-transition-duration: 400ms;
    	-o-transition-property: width, background;
    	-o-transition-timing-function: ease;
    	width: 72px;
    }

    To hide the search field, you could simply change the above to read:

    #branding #s {
    	display:none;
    }

    I hope that helps.

    Eric

    Thanks a lot. How completely I can delete it? Because I want to take site title into one line. How can I do it?

    All,

    I saw this thread as I was researching this very topic today and wanted to contribute the technique I used.

    I’m using WP 3.5.2 using the twentyeleven theme, and no, I didn’t child theme it, as the changes I have made were minimal. I know it’s good practice to do this (and I have on all the other WP blogs I have installed) but I chose not to on this one.

    At any rate, for WP 3.5.2 using twentyeleven:

    [removed – do not advise people to modify theme files – these kinds of changes need to be made in a child theme]

    I hope this helps.

    Cheers,

    wordman

    WPyogi

    @wpyogi

    Forum Moderator

    NO – modifying theme files is NEVER a good idea especially in a default theme.

    A Child Theme must be used for modifications.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Remove search box from header in twentyeleven’ is closed to new replies.