WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Removing "Search for:" from around the Search Box (4 posts)

  1. wurliuchi
    Member
    Posted 3 years ago #

    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>
  2. Sennza Pty Ltd
    Member
    Posted 3 years ago #

    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 :)

  3. wurliuchi
    Member
    Posted 3 years ago #

    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!

  4. Sennza Pty Ltd
    Member
    Posted 3 years ago #

    No worries.

    Happy to help out! :)

Topic Closed

This topic has been closed to new replies.

About this Topic