WordPress.org

Ready to get started?Download WordPress

Forums

[closed] Remove search box from header in twentyeleven (9 posts)

  1. aasbd
    Member
    Posted 1 year ago #

    How to remove search box from twenty eleven theme from the header option?
    http://www.aas-bd.com

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

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

  3. aasbd
    Member
    Posted 1 year ago #

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

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

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

  5. aasbd
    Member
    Posted 1 year ago #

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

  6. Eric Amundson
    Volunteer Moderator
    Posted 1 year ago #

    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

  7. aasbd
    Member
    Posted 1 year ago #

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

  8. wordman1994
    Member
    Posted 1 year ago #

    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

  9. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

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

    A Child Theme must be used for modifications.

Topic Closed

This topic has been closed to new replies.

About this Topic