Skip to content

Commit

Permalink
Merge pull request #593 from clarkbw/search_value_preserved
Browse files Browse the repository at this point in the history
Preserve the search query in the search input
  • Loading branch information
retlehs committed Dec 6, 2012
2 parents 18dadde + eca7244 commit 68e2a61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/searchform.php
@@ -1,5 +1,5 @@
<form role="search" method="get" id="searchform" class="form-search" action="<?php echo home_url('/'); ?>">
<label class="hide" for="s"><?php _e('Search for:', 'roots'); ?></label>
<input type="text" value="" name="s" id="s" class="search-query" placeholder="<?php _e('Search', 'roots'); ?> <?php bloginfo('name'); ?>">
<input type="text" value="<?php if (is_search()) { echo get_search_query(); } ?>" name="s" id="s" class="search-query" placeholder="<?php _e('Search', 'roots'); ?> <?php bloginfo('name'); ?>">
<input type="submit" id="searchsubmit" value="<?php _e('Search', 'roots'); ?>" class="btn">
</form>

0 comments on commit 68e2a61

Please sign in to comment.