-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsearchform.php
24 lines (22 loc) · 941 Bytes
/
searchform.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php $placeholder = esc_attr__('Search', 'blankout'); ?>
<form role="search" method="get" id="searchform" action="<?php echo home_url('/'); ?>" class="input-group">
<?php if (get_search_query() == '') : ?>
<input type="text" value="" name="s" id="s" placeholder="<?php echo $placeholder; ?>" class="form-control" />
<?php else : ?>
<input type="text" value="<?php the_search_query(); ?>" name="s" id="s" placeholder="<?php the_search_query(); ?>" class="form-control" />
<?php endif; ?>
<span class="input-group-btn">
<button type="submit" id="searchsubmit" class="btn btn-default">Go</button>
</span>
<?php // no submit button version <input type="hidden" id="searchsubmit" /> ?>
</form>
<?php // alternate version
/*
<form class="form-search" action="/" method="get">
<div class="input-append">
<input type="text" name="s" class="span7 search-query">
<button type="submit" class="btn">Search</button>
</div>
</form>
*/
?>