Support » Themes and Templates » Removing "Search for:" from around the Search Box

  • Resolved wurliuchi

    (@wurliuchi)


    Here’s the site I’m working on for my friend: carolynwinggreenlee.com

    How can I remove the words “search for:” from around the search box in the sidebar? I just want the box and the button.

    Here is the code from that section of the sidebar. The words “search for” can’t be found, but still they show up.

    Thank you for any help.

    <div id="sidebar">
    <ul>
    <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar() ) : else : ?>
    <li>
      <h2><?php _e('Search'); ?></h2>
    	<form id="searchform" method="get" action="http://carolynwinggreenlee.com/">
    		<input type="text" name="s" id="s" class="textbox" value="<?php echo wp_specialchars($s, 1); ?>" />
    		<input id="btnSearch" type="submit" name="submit" value="<?php _e('Go'); ?>" />
    	</form>
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey there,

    It’s probably easier to hide it with CSS so add in this:

    #searchform .screen-reader-text {
       display:none;
    }

    Put that into the style.css file of your theme and that should hide it for you 🙂

    It’s probably easier to hide it with CSS so add in this:

    #searchform .screen-reader-text {
    display:none;
    }

    Put that into the style.css file of your theme and that should hide it for you 🙂

    Beautiful! Thanks so much! It worked like a charm!

    No worries.

    Happy to help out! 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Removing "Search for:" from around the Search Box’ is closed to new replies.