How to remove search bar from a wordpress theme?
3 s
If the search field is implemented as a widget, this can be done via the administration interface. Just navigate to Appearance > Widgets and drag the search widget from the widget area to the “Available Widgets” pane.
If the search field is hard-coded into the theme, it might be easier to edit the CSS rather than the HTML and PHP. Here’s how:
- Use Firebug or a similar tool to locate the DIV element containing the search code.
- In the theme’s CSS file (probably style.css), add
display: none
to that DIV. That’s it!
This is a minimally invasive approach. If you ever want to re-enable the search bar, just remove the display: none
statement from your CSS.