Sanjeev Sabhlok's notes on technology, hardware, gardening

Remove search option in WordPress (whitehouse)

Two steps:

1) Remove everything from searchform.php

<form method="get" id="searchform" class="" action="<?php bloginfo('home'); ?>/">

<fieldset>
<input type="text" value="<?php _e('Search',TDOMAIN);?>" name="s" id="s" onfocus="if (this.value == '<?php _e('Search',TDOMAIN);?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e('Search',TDOMAIN);?>';}" />
 
<input type="image" value="Go" src="<?php echo THEME_IMAGES;?>/search-btn.png" class="submit btn" />
</fieldset>
</form>
 
2) Delete the stuff in red from sidebar.php.
 
<div id="sidebar" role="complementary">
 
<?php
global $sidesearch;
if($sidesearch):?>
<div id="sidesearch" class="fix">
<?php include (THEME_LIB . '/_searchform.php'); ?>
</div>
<?php endif;?>
 
<div id="widgets">
<?php if(VPRO) include(THEME_LIB.'/_grandchildnav_pro.php');?>
 
<?php if(pagelines('the_sidebar', $post->ID) == 'secondary'):?>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Secondary Sidebar') ) : ?>
<?php _e('The secondary sidebar has been selected but doesn\'t have any widgets. Add some widgets to your secondary sidebar in the admin under appearance > widgets.',TDOMAIN);?>
<?php endif; ?>
<?php elseif(pagelines('the_sidebar', $post->ID) == 'short'):?>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Short Sidebar') ) : ?>
<?php _e('The short sidebar has been selected but doesn\'t have any widgets. Add some widgets to your short sidebar in the admin under appearance > widgets.',TDOMAIN);?>
<?php endif; ?>
<?php else:?>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
<?php if(!pagelines('sidebar_no_default')) include(THEME_LIB.'/_defaultsidebar.php');?>
<?php endif; ?>
<?php endif;?>
 
</div>
</div>
Print Friendly

sabhlok

View more posts from this author

Leave a Reply

Your email address will not be published. Required fields are marked *