News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Hide Search Bar?

Started by MissMaria, October 07, 2011, 05:31:08 PM

Previous topic - Next topic

MissMaria

How do I hide the search bar? I'd like to take it off the site completely.

Thank you! :)

Antechinus


MissMaria

AvaraMu.

Sorry I forgot to include that! :)

Antechinus

Can't find it on the Theme Site. Better post a link to your site, or attach the index.template.php.

mashby

#4
I'd guess this one:
http://custom.simplemachines.org/themes/index.php?lemma=682
:)

Remove this from the index.template.php file of that theme:
<div id="search">';
echo '
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
<a href="', $scripturl, '?action=search;advanced" title="', $txt['smf298'], '"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="', $txt['smf298'], '" /></a>
<input type="text" class="inputs" name="search" value="Search..." style="width: 120px;" />
<input type="submit" name="submit" value="', $txt[182], '" class="submit" style="width: 10ex;" />
<input type="hidden" name="advanced" value="0" />';

// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="', $context['current_topic'], '" />';

// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';
echo '
</form>
</div>';
Always be a little kinder than necessary.
- James M. Barrie

Antechinus

Good catch.

Style.css:

#search {
float: right;
margin-right: 15px;
margin-top: 5px;
font-family: Tahoma, Arial, Helvetica, sans-serif;
font-size: 11px;
clear: both;
}


Change to:

#search {
display: none;
}


That will certainly hide it, but depending on what else is up there some other things might move around too. Try it and see.

Advertisement: