Remove search box from menu bar

  • Unknown's avatar

    Hi–Just starting to cobble together my blog/web site. Changed the main home page to static, not blog. On my menu there is now a ‘search box’ among my menu tabs. How to remove it? I have upgraded to Custom Design. Thanks! — Helen

    (I know some CSS code, but not a lot.)

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    The top bit will get rid of the search box, and the bottom bit will let the menu flow to the right so it isn’t on two lines.

    #branding #searchform {
    display: none;
    }
    
    #branding .only-search + #access div {
    padding: 0;
    }
  • Unknown's avatar

    Actually let’s change that second bit.

    #branding .only-search + #access div {
    padding-right: 0;
    }
  • Unknown's avatar

    Thanks for your quick reply! Now the hard part: Where is the code/page for that menu bar so I can wipe out the ‘search box?’ I looked under header, and then under my list of menu categories…. but can’t figure out where it’s located, and then how to edit it. (I’m fairly basic in my code-editing skills, BTW.)

  • Unknown's avatar

    When you alter a theme’s stylesheet, you only need to put in the Editor the modification/additions to the CSS, not the entire thing. Read this for more info:
    http://csswiz.wordpress.com/2009/10/15/if-you-have-the-wp-com-css-upgrade/

  • Unknown's avatar

    Ummm, you posted in the CSS support forum which lead me to believe that you have the Custom Design Upgrade. Do you have it or not?

  • Unknown's avatar

    Yes, I do have it. Purchased yesterday.

  • Unknown's avatar

    Then you go to appearance > custom design, click on the CSS tab at the top, clear all the informational text out of the CSS window and paste in what I gave you above and make sure the “add to existing…” is selected before clicking save stylesheet. You can preview the change prior to saving by clicking the preview button. Sometimes you might have to force refresh the preview page to see the changes. Some browsers hang onto cached pages way too long.

  • Unknown's avatar

    Hey, it works! Thanks SO much. I was plowing through all the very useful CSS tutorials–and you gave me the instant shortcut through all those lessons. My menu bar looks great.

    Thanks again!

  • Unknown's avatar

    One last question; not finding it easily. The spacing is much too much between every line. Look at my “Places of My Heart” menu tag, listing my stories — it’s just too spacey! I’ve seen other WordPress web sites similar to mine with tighter spacing between lines.

    What’s the CSS code to narrow the padding? Again, I’m fairly new to CSS, and appreciate your help. (I have the Custom Design upgrade, BTW.)

  • Unknown's avatar

    Add this to your CSS and play with the line height. 1.4em is what it is now. If you go under 1, then include the 0. in front of the value such as 0.9em .

    #access ul ul a {
    line-height: 1.4em;
    }
  • Unknown's avatar

    Hmmm, I entered it into the CSS and nothing happened (I moved it to different settings, such as 0.8em).

    Hmmm??? And thanks.

  • Unknown's avatar

    Did you do a “save stylesheet after the change or were you just using the preview? Sometimes with the preview you have to force refresh the preview page to see the change, and I am not seeing the above code in your custom CSS.

  • Unknown's avatar

    I was using ‘preview,’ but although I have added it and ‘saved stylesheet’ in the CSS styling editor, I still am not getting the narrower spacing between lines. My menu tab “Places of My Heart” is where I’m doing the experimenting. The first two areas (Turkey, USSR) I did using ‘heading 5’ to give me a narrower spacing; but I can’t do that for every single sentece I write because it wants to default back to ‘paragraph’ settings. Too time-consuming!

    That third section is where it’s at the default setting with wide, wide spacing, even with the code. Here’s what my CSS page now looks like: (Line height is default at 1.4; I typed it 0.8 which shows up as .8)

    #access ul ul a {
    line-height:.8em;
    }

    #branding #searchform {
    display:none;
    }

    #branding .only-search + #access div {
    padding-right:0;
    }

    Thanks for your patience and help with this; I know that once this line spacing is resolved it will be a breeze putting this site together and getting it published!

  • Unknown's avatar

    Are you talking about changing the actual menu tabs themselves or did I misunderstand?

  • Unknown's avatar

    The place of the heart tab, when I click it returns a 404 error (nothing found to display which means wordpress cannot find anything.

  • Unknown's avatar

    Wow, I see everything–all the pages when I go to my web site. The tab is “Places of My Heart’ nad there’s a page of stories I’ve done. I used heading-5 in order to get closer spacing between lines, but I can’t do that for everything. The default is the ‘paragraph’ which gives huge spaces between lines and especially between paragraphs — bad for making lists. I have examples of those gaps on that page.

    Yet, I’ve typed in all the codes you’ve given me; the one that eliminates the “search box” from my menu page works, but the one for altering spacing (default is 1.4 em) to something like 0.8 em isn’t working — even with refreshes, etc. Thanks!!!

  • Unknown's avatar

    Is the page set to private, or have you by chance not yet published it? I’m seeing virtually a blank page in both Safari and in Firefox.

  • Unknown's avatar

    Place of my Heart, A Bio, Briefly, Media and Global Health Lessons I get this:

    This is somewhat embarrassing, isn’t it?
    It seems we can’t find what you’re looking for. Perhaps searching, or one of the links below, can help.

    All other pages I see a page title, but no content at all.

  • Unknown's avatar

    Huh. I had almost all pages “published’ but had others ‘private’ that I’m still working on. I now have everything I”ve done ‘published.” BTW: All but the “blog/posts” are pages, not posts.

    When I access my site from other machines and from both IE and Firefox, everything shows up EXCEPT on each page the left margin says “edit.” Strange, yes? since the pages are published and refreshed. I’ve gone all my settings, all the instructions and am flummoxed. (I have used proprietary programs–like when I worked at Microsoft–for creating and publishing pages on web sites, so I am familiar with this part of oneline sites.) It just seems there is something very obvious that I”m missing, so hope you can help. :-)

  • The topic ‘Remove search box from menu bar’ is closed to new replies.