WordPress.org

Ready to get started?Download WordPress

Forums

Remove searchbox (6 posts)

  1. Ligefrem
    Member
    Posted 2 years ago #

    I need to remove the searchbox on nillerpilfinger.dk, but I can't find the script that calls it. Here the php for the header:

    [Code moderated as per the Forum Rules. Please use the pastebin]

  2. ChristiNi
    Member
    Posted 2 years ago #

    Hi Ligefrem,

    First, make sure you are using a Child Theme. In the style sheet for your child theme, add this bit of CSS:

    #searchform {
    display: none;
    }

    That will set the display of the search box to none and it will not affect the flow of your layout either.

    Hope this helps!

  3. Ligefrem
    Member
    Posted 2 years ago #

    But I'm not using a child theme (I knew how to do that) and I want to remove the searchbox from THIS theme.

  4. chisler
    Member
    Posted 2 years ago #

    you need to remove the div from the navigation section (probably in header.php). Search for <div id="search"> and remove (maybe comment out first just to make sure) everything up and including the closing </div> after the </form> tag.

    Hope this helps.

  5. ChristiNi
    Member
    Posted 2 years ago #

    Hi Ligefrem,

    I suggested a Child Theme because if you make changes to a theme (not a Child Theme of the theme) your changes can be overwritten in the future if the theme is updated.

    In your CSS style sheet modify:

    #search {
        position: absolute;
        right: 0;
        top: 10px;
        width: 229px;
    }

    to:

    #search {
        position: absolute;
        right: 0;
        top: 10px;
        width: 229px;
        display: none;
    }

    Good luck with your site!

  6. chisler
    Member
    Posted 2 years ago #

    Much better idea, thanks Christi. Ligefrem, follow Christi's advice, make your changes in a child theme so you dont lose anything if you upgrade your theme.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.