How do I remove search box from content area

The WP core dynamics seems to display a search box in the main content area whichever theme I use and I need to know how I can remove it (the search box widget in the side bar I want to keep). I believe I go into search.php, but which lines do I remove or change?
Here is a pic showing what I mean.

What you really want to do is use css to hide the search box. that way you won’t have to modify core with every single version of wp that comes along.

I typed “css remove search box” into google to see if I could find a quick link to include on how to. Since the top google result took me right to the very topic on the wordpress forums, I think I’ll just leave it at that.

Hello. I just used the widget area to remove the search box if that is what you mean. Just drag it to inactive widgets and you should be good to go.

Good luck

Do you people actually read someone’s post???

I don’t know what’s going on here. Instead of telling me what you typed into google, why don’t you just tell me? If you know of course…

No that is not what I meant. I clearly asked how do I remove the search box FROM THE MAIN CONTENT AREA, not the search box FROM THE WIDGET AREA. Jeeez!!!


Fair enough, but this is referring to a search box in the header area, not the main content area. What I’m getting in the main content area is this - a 404 error message:
‘Not Found > Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post’ - this is followed by a very large search box. So how do I stop this from hapenning.

ahhh I see now. Prior to this I thought you just wanted to remove a search box from the page?

Is the functionality of the page working correctly? or is this an error where we need to find the source of the error and correct that?

You image shows either 2 or 3 search boxes (depending what is to the right of HOME in the title bar). Have you installed any plugins? especially SEO or search related? What happens if you disable them one by one and watch for behavior changes?

There’s a couple Dreamhost staff members that post here that can try to find your site and perhaps explain what’s going on, the rest of us are customers just like you that don’t have a way to find what you’re working on. If you could give us the URL of the site so we can duplicate this we may be able to help further. Alot of clues can be gained from scanning page source, watching the page load cycle with a tool like firebug, and even just being able to see what’s displayed in the url bar.

I give up… I may as well be talking to the brick wall. Bye, bye!

The question you asked was answered.

Unfortunately you are unwilling to cooperate as we try to find YOUR specific answer. Your picture, while helpful is also NOT helpful because it leaves behind as many questions as it answers.

ajac63 - The lines you remove are based entirely on your theme. You’d edit 404.php to change it, however it’s a bad idea to edit themes directly. You should make a child theme instead.

Just avoid the 404 by having links that actually display content; i.e. pages/posts.

Many thanks for that. So if I put some content in the ‘Home’ page then this will prevent the 404 error? The other pages don’t have content either but I don’t get a 404 error for those. In any case the content is not yet ready - it’s fairly complex, and this is only my test site anyway. When it’s all working correctly I will then mirror everything on the live site.

The server will respond with a “404” when a request can not be satisfied. Basically if it can’t find a page that was requested by the browser then it responds with the 404 error document. If all your site links point to existing pages or posts then a 404 page should never be encountered (unless via a typo).