WordPress.org

Ready to get started?Download WordPress

Forums

How to get rid of search bar in header? (4 posts)

  1. Jake Huddleston
    Member
    Posted 1 year ago #

    Hi there. I want to remove the search bar which is overlaid over my header on my site. I believe I know which code I need to remove from header.php to remove it, but I want to be sure before I go ahead and do so. Thanks for any help!

    Here is the link to my site: http://www.jakehuddleston.com

  2. I think that you'll want to remove the following:

    <div id="pao_search"><form role="search" method="get" id="searchform" action="http://www.jakehuddleston.com/" >
    	<div><label class="screen-reader-text" for="s">Search for:</label>
    	<input type="text" value="" name="s" id="s" />
    	<input type="submit" id="searchsubmit" value="Search" />
    	</div>
    	</form></div>

    or in your css, just add #pao_search {display:none;}

    By the way when you say this:

    I believe I know which code I need to remove from header.php to remove it, but I want to be sure before I go ahead and do so. Thanks for any help!

    I would recommend that you make a back up of your theme, make changes and then if something breaks just re-upload the back up. It's by breaking things that you learn. :)

  3. Jake Huddleston
    Member
    Posted 1 year ago #

    Thanks Christine, I am new to WordPress and coding in general so I will definitely start to 'experiment' with changing code to see what works.

    Unfortunately I can't seem to find the code that you said to remove...is it in the style.css or in header.php? Thanks!

  4. Header.php line 61.

    Look for pao_search

    The code in the php is slightly different and looks like so:

    <div id="pao_search"><?php get_search_form(); ?></div>

    The get_search_form function is a WordPress function that generates the search form. :)

Topic Closed

This topic has been closed to new replies.

About this Topic