Removing the Search Feature in the Header

Hello all,

I was wondering if it's possible to remove the search feature in the heading. I don't need it and want it gone. Thanks!

-Cindye

  • 3SixtyEvolve

    Welcome to our Community @cindye!

    Currently there isn't any option within the Theme Options to remove the search box on the header or the pages, so you would have to create a child theme and then remove the php code calling the search box from within the child theme.

    You will find the code in question in the header.php, lines 78 to 96.

    To make it easy for you I've already created a child theme with the code removed from the header.php. However, for reference sake, this is how you can do it yourself:

    Go to wp-contents/themes/product/themes/product-child and copy it into the wp-contents/themes folder.

    Now copy the header.php from wp-contents/themes/product to wp-contents/themes/product-child.

    Open the header.php file and remove the following code:

    <div id="search-bar">
    						<?php
    							$sitedescription = get_option('dev_product_description');
    							$sitetitle = get_option('dev_product_title');
    
    									if ($sitedescription == ""){
    										$sitedescription = "Enter a site description in options";
    									}
    
    									if ($sitetitle == ""){
    										$sitetitle = "Product";
    									}
    						?>
    					<h2><?php echo stripslashes($sitedescription); ?></h2>
    					<?php locate_template( array( '/library/components/searchform.php' ), true ); ?>
    					<?php if($bp_existed == 'true') : ?>
    						<?php //do_action( 'bp_search_login_bar' ) ?>
    					<?php endif; ?>
    				</div><!-- #search-bar -->

    Save the file back to wp-contents/themes/product-child and that should get it done for you.

    You can also make changes to any part of your site in the same way, either with custom php or css.

    Have fun with your project and let us know if there is anything else we can assist with.

    Gina

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.